Upgrade to the latest versions of gimli, addr2line, object (#2901)

* Upgrade to the latest versions of gimli, addr2line, object

And adapt to API changes. New gimli supports wasm dwarf, resulting in
some simplifications in the debug crate.

* upgrade gimli usage in linux-specific profiling too

* Add "continue" statement after interpreting a wasm local dwarf opcode
This commit is contained in:
Benjamin Bouvier
2021-05-12 17:53:17 +02:00
committed by GitHub
parent 60f7b23ea1
commit d7053ea9c7
16 changed files with 195 additions and 190 deletions

View File

@@ -22,7 +22,7 @@ serde = { version = "1.0.94", features = ["derive"] }
log = { version = "0.4.8", default-features = false }
more-asserts = "0.2.1"
cfg-if = "1.0"
gimli = "0.23"
gimli = "0.24"
[badges]
maintenance = { status = "actively-developed" }

View File

@@ -205,19 +205,28 @@ impl<'data> ModuleEnvironment<'data> {
let slice = gimli::EndianSlice::new(data, endian);
match name {
".debug_str" => dwarf.debug_str = gimli::DebugStr::new(data, endian),
// Dwarf fields.
".debug_abbrev" => dwarf.debug_abbrev = gimli::DebugAbbrev::new(data, endian),
".debug_addr" => dwarf.debug_addr = gimli::DebugAddr::from(slice),
// TODO aranges?
".debug_info" => dwarf.debug_info = gimli::DebugInfo::new(data, endian),
".debug_line" => dwarf.debug_line = gimli::DebugLine::new(data, endian),
".debug_addr" => dwarf.debug_addr = gimli::DebugAddr::from(slice),
".debug_line_str" => dwarf.debug_line_str = gimli::DebugLineStr::from(slice),
".debug_str_sup" => dwarf.debug_str_sup = gimli::DebugStr::from(slice),
".debug_ranges" => info.debug_ranges = gimli::DebugRanges::new(data, endian),
".debug_rnglists" => info.debug_rnglists = gimli::DebugRngLists::new(data, endian),
".debug_str" => dwarf.debug_str = gimli::DebugStr::new(data, endian),
".debug_str_offsets" => dwarf.debug_str_offsets = gimli::DebugStrOffsets::from(slice),
".debug_str_sup" => {
let mut dwarf_sup: Dwarf<'data> = Default::default();
dwarf_sup.debug_str = gimli::DebugStr::from(slice);
dwarf.sup = Some(Arc::new(dwarf_sup));
}
".debug_types" => dwarf.debug_types = gimli::DebugTypes::from(slice),
// Additional fields.
".debug_loc" => info.debug_loc = gimli::DebugLoc::from(slice),
".debug_loclists" => info.debug_loclists = gimli::DebugLocLists::from(slice),
".debug_str_offsets" => dwarf.debug_str_offsets = gimli::DebugStrOffsets::from(slice),
".debug_types" => dwarf.debug_types = gimli::DebugTypes::from(slice),
".debug_ranges" => info.debug_ranges = gimli::DebugRanges::new(data, endian),
".debug_rnglists" => info.debug_rnglists = gimli::DebugRngLists::new(data, endian),
other => {
log::warn!("unknown debug section `{}`", other);
return;