mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
LibDebug: Implement support for AttributeDataForm::ImplicitConst
While symbolicating a crash dump for UserspaceEmulator I came across another data form we didn't support. ImplicitConst encodes a LEB128 value in the abbreviation record rather than - like all other values - in the .debug_info section.
This commit is contained in:
parent
278605cde6
commit
9bcdbe205b
6 changed files with 18 additions and 5 deletions
|
@ -33,7 +33,7 @@ DIE::DIE(const CompilationUnit& unit, u32 offset)
|
|||
|
||||
// We iterate the attributes data only to calculate this DIE's size
|
||||
for (auto& attribute_spec : abbreviation_info.value().attribute_specifications) {
|
||||
m_compilation_unit.dwarf_info().get_attribute_value(attribute_spec.form, stream, &m_compilation_unit);
|
||||
m_compilation_unit.dwarf_info().get_attribute_value(attribute_spec.form, attribute_spec.value, stream, &m_compilation_unit);
|
||||
}
|
||||
}
|
||||
m_size = stream.offset() - m_offset;
|
||||
|
@ -48,7 +48,7 @@ Optional<AttributeValue> DIE::get_attribute(const Attribute& attribute) const
|
|||
VERIFY(abbreviation_info.has_value());
|
||||
|
||||
for (const auto& attribute_spec : abbreviation_info.value().attribute_specifications) {
|
||||
auto value = m_compilation_unit.dwarf_info().get_attribute_value(attribute_spec.form, stream, &m_compilation_unit);
|
||||
auto value = m_compilation_unit.dwarf_info().get_attribute_value(attribute_spec.form, attribute_spec.value, stream, &m_compilation_unit);
|
||||
if (attribute_spec.attribute == attribute) {
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue