Skip to content

Commit

Permalink
Merge pull request gimli-rs#525 from khuey/gnu-extensions
Browse files Browse the repository at this point in the history
Pick up non-standard GNU extension attributes when looking for address and range list bases.
  • Loading branch information
philipc authored Jul 6, 2020
2 parents 3408a50 + 81631d6 commit 6597ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/read/dwarf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ impl<R: Reader> Unit<R> {
unit.str_offsets_base = base;
}
}
constants::DW_AT_addr_base => {
constants::DW_AT_addr_base | constants::DW_AT_GNU_addr_base => {
if let AttributeValue::DebugAddrBase(base) = attr.value() {
unit.addr_base = base;
}
Expand All @@ -573,7 +573,7 @@ impl<R: Reader> Unit<R> {
unit.loclists_base = base;
}
}
constants::DW_AT_rnglists_base => {
constants::DW_AT_rnglists_base | constants::DW_AT_GNU_ranges_base => {
if let AttributeValue::DebugRngListsBase(base) = attr.value() {
unit.rnglists_base = base;
}
Expand Down
6 changes: 4 additions & 2 deletions src/read/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1654,10 +1654,12 @@ impl<R: Reader> Attribute<R> {
constants::DW_AT_str_offsets_base => {
stroffsetsptr!();
}
constants::DW_AT_addr_base => {
constants::DW_AT_addr_base |
constants::DW_AT_GNU_addr_base => {
addrptr!();
}
constants::DW_AT_rnglists_base => {
constants::DW_AT_rnglists_base |
constants::DW_AT_GNU_ranges_base => {
rnglistsptr!();
}
constants::DW_AT_dwo_name => {
Expand Down

0 comments on commit 6597ad2

Please sign in to comment.