Fix bare except:
s not catching anything
#354
@ -85,7 +85,7 @@ unsafe fn get_ttype_entry(
|
||||
encoding | DW_EH_PE_pcrel,
|
||||
ttype_base,
|
||||
)
|
||||
srenblad marked this conversation as resolved
Outdated
|
||||
.map(|v| (v != ttype_base).then(|| v as *const u8))
|
||||
.map(|v| (v != 0).then(|| v as *const u8))
|
||||
}
|
||||
|
||||
pub unsafe fn find_eh_action(
|
||||
@ -275,6 +275,11 @@ unsafe fn read_encoded_pointer_with_base(reader: &mut DwarfReader, encoding: u8,
|
||||
_ => return Err(()),
|
||||
};
|
||||
|
||||
if result == 0 {
|
||||
// null is just encoded as 0, even if a relative encoding is used for the table.
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
result += if (encoding & 0x70) == DW_EH_PE_pcrel {
|
||||
original_ptr as usize
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user
I am trying to understand what this is doing differently from the
read_encoded_pointer_with_base
version, assuming the encoding isDW_EH_PE_absptr | DW_EH_PE_pcrel
? My assumption is that the pcrel hack is just to add the offset and the original offset, which you also do explicitly here (only difference being the use ofadd
vs+=
).