-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle DW_TAG_partial_unit #514
Comments
What is the llvm-dwarfdump output? |
The dump for .debug_info is ~700Mb so it's why I sumed it up in my comment 0. |
It looks this is a regression.
With master
|
I'll run a bisection. |
It looks like this was caused by 9dabba0 |
I've uploaded the file (gzipped) here: iris_dri.so-20.1.1-1.fc32.x86_64.debug.gz |
More specifically with that change |
diff --git a/src/read/dwarf.rs b/src/read/dwarf.rs
index 04fd013..eeb1a74 100644
--- a/src/read/dwarf.rs
+++ b/src/read/dwarf.rs
@@ -601,25 +601,25 @@ impl<R: Reader> Unit<R> {
if let AttributeValue::DebugRngListsBase(base) = attr.value() {
unit.rnglists_base = base;
}
}
_ => {}
}
}
}
unit.name = match name {
- Some(val) => Some(dwarf.attr_string(&unit, val)?),
+ Some(val) => dwarf.attr_string(&unit, val).ok(),
None => None,
};
unit.comp_dir = match comp_dir {
- Some(val) => Some(dwarf.attr_string(&unit, val)?),
+ Some(val) => dwarf.attr_string(&unit, val).ok(),
None => None,
};
unit.line_program = match line_program_offset {
Some(offset) => Some(dwarf.debug_line.program(
offset,
unit.header.address_size(),
unit.comp_dir.clone(),
unit.name.clone(),
)?),
None => None, fixes it. |
This matches the behaviour of llvm-dwarfdump: e.g. dwarf::toString(UnitDie.find(DW_AT_comp_dir)) just returns an Optional and doesn't fail. Fixes gimli-rs#514
I'm trying to use dump_syms which depends on symbolic which itself depends on gimli to dump breakpad symbols for iris_dri.so-20.1.1-1.fc32.x86_64.debug.
I get neither DW_TAG_subprogram nor DW_TAG_inlined_subroutine, all the units are either empty or erroneous.
I llvm-dwarf dump the file:
The first 54 CU looks like:
These ones look empty.
And all the next CU start with something like:
they look like erroneous.
I greped on
TAG_partial_unit
on the gimli source and I got almost nothing so maybe it's because gimli doesn't handle partial unit.The text was updated successfully, but these errors were encountered: