Skip to content

Commit 8dc4d24

Browse files
authored
fix(dwarf): Allow -2 as a tombstone address (#937)
This updates the `gimli` dependency to give us access to gimli-rs/gimli#791, in which the address -2 is allowed as a tombstone address in some DWARF files sections. This lets us extract debug info from some DWARF files that we couldn't handle before.
1 parent 927694c commit 8dc4d24

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Unreleased
44

5-
- feat(elf): Added support for dynamic symbols when DYNAMIC segment is missing ([#935](https://github.com/getsentry/symbolic/pull/935))
5+
- feat(elf): Added support for dynamic symbols when DYNAMIC segment is missing. ([#935](https://github.com/getsentry/symbolic/pull/935))
6+
- fix(dwarf): -2 is now an allowed tombstone address in some DWARF sections.
7+
For details, see https://github.com/gimli-rs/gimli/pull/791. ([#937](https://github.com/getsentry/symbolic/pull/937)).
68

79
## 12.16.2
810

Cargo.lock

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fallible-iterator = "0.3.0"
2323
flate2 = { version = "1.0.25", default-features = false, features = [
2424
"rust_backend",
2525
] }
26-
gimli = { version = "0.31.0", default-features = false, features = [
26+
gimli = { version = "0.32.3", default-features = false, features = [
2727
"read",
2828
"std",
2929
"fallible-iterator",

symbolic-debuginfo/src/dwarf.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,8 @@ struct DwarfSections<'data> {
10971097
debug_str_offsets: DwarfSectionData<'data, gimli::read::DebugStrOffsets<Slice<'data>>>,
10981098
debug_ranges: DwarfSectionData<'data, gimli::read::DebugRanges<Slice<'data>>>,
10991099
debug_rnglists: DwarfSectionData<'data, gimli::read::DebugRngLists<Slice<'data>>>,
1100+
debug_macinfo: DwarfSectionData<'data, gimli::read::DebugMacinfo<Slice<'data>>>,
1101+
debug_macro: DwarfSectionData<'data, gimli::read::DebugMacro<Slice<'data>>>,
11001102
}
11011103

11021104
impl<'data> DwarfSections<'data> {
@@ -1116,6 +1118,8 @@ impl<'data> DwarfSections<'data> {
11161118
debug_str_offsets: DwarfSectionData::load(dwarf),
11171119
debug_ranges: DwarfSectionData::load(dwarf),
11181120
debug_rnglists: DwarfSectionData::load(dwarf),
1121+
debug_macinfo: DwarfSectionData::load(dwarf),
1122+
debug_macro: DwarfSectionData::load(dwarf),
11191123
}
11201124
}
11211125
}
@@ -1156,6 +1160,8 @@ impl<'d> DwarfInfo<'d> {
11561160
debug_str: sections.debug_str.to_gimli(),
11571161
debug_str_offsets: sections.debug_str_offsets.to_gimli(),
11581162
debug_types: Default::default(),
1163+
debug_macinfo: sections.debug_macinfo.to_gimli(),
1164+
debug_macro: sections.debug_macro.to_gimli(),
11591165
locations: Default::default(),
11601166
ranges: RangeLists::new(
11611167
sections.debug_ranges.to_gimli(),

0 commit comments

Comments
 (0)