diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
commit | 3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245 (patch) | |
tree | daf049b282ab10e8c3d03e409b3cd84ff3f7690c /vendor/addr2line/src/function.rs | |
parent | Adding debian version 1.68.2+dfsg1-1. (diff) | |
download | rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.tar.xz rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | vendor/addr2line/src/function.rs | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/vendor/addr2line/src/function.rs b/vendor/addr2line/src/function.rs index 1589acdbe..44dc73f24 100644 --- a/vendor/addr2line/src/function.rs +++ b/vendor/addr2line/src/function.rs @@ -68,15 +68,24 @@ impl<R: gimli::Reader> Functions<R> { match entries.read_attribute(*spec) { Ok(ref attr) => { match attr.name() { - gimli::DW_AT_low_pc => { - if let gimli::AttributeValue::Addr(val) = attr.value() { - ranges.low_pc = Some(val); + gimli::DW_AT_low_pc => match attr.value() { + gimli::AttributeValue::Addr(val) => { + ranges.low_pc = Some(val) } - } + gimli::AttributeValue::DebugAddrIndex(index) => { + ranges.low_pc = + Some(dwarf.sections.address(unit, index)?); + } + _ => {} + }, gimli::DW_AT_high_pc => match attr.value() { gimli::AttributeValue::Addr(val) => { ranges.high_pc = Some(val) } + gimli::AttributeValue::DebugAddrIndex(index) => { + ranges.high_pc = + Some(dwarf.sections.address(unit, index)?); + } gimli::AttributeValue::Udata(val) => { ranges.size = Some(val) } @@ -352,13 +361,18 @@ impl<R: gimli::Reader> InlinedFunction<R> { for spec in abbrev.attributes() { match entries.read_attribute(*spec) { Ok(ref attr) => match attr.name() { - gimli::DW_AT_low_pc => { - if let gimli::AttributeValue::Addr(val) = attr.value() { - ranges.low_pc = Some(val); + gimli::DW_AT_low_pc => match attr.value() { + gimli::AttributeValue::Addr(val) => ranges.low_pc = Some(val), + gimli::AttributeValue::DebugAddrIndex(index) => { + ranges.low_pc = Some(dwarf.sections.address(unit, index)?); } - } + _ => {} + }, gimli::DW_AT_high_pc => match attr.value() { gimli::AttributeValue::Addr(val) => ranges.high_pc = Some(val), + gimli::AttributeValue::DebugAddrIndex(index) => { + ranges.high_pc = Some(dwarf.sections.address(unit, index)?); + } gimli::AttributeValue::Udata(val) => ranges.size = Some(val), _ => {} }, |