mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +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
|
@ -49,7 +49,7 @@ void DwarfInfo::populate_compilation_units()
|
|||
}
|
||||
}
|
||||
|
||||
AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form,
|
||||
AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t implicit_const_value,
|
||||
InputMemoryStream& debug_info_stream, const CompilationUnit* unit) const
|
||||
{
|
||||
AttributeValue value;
|
||||
|
@ -210,6 +210,12 @@ AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form,
|
|||
value.data.as_string = reinterpret_cast<const char*>(strings_data.data() + offset);
|
||||
break;
|
||||
}
|
||||
case AttributeDataForm::ImplicitConst: {
|
||||
/* Value is part of the abbreviation record. */
|
||||
value.type = AttributeValue::Type::SignedNumber;
|
||||
value.data.as_i32 = implicit_const_value;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
dbgln("Unimplemented AttributeDataForm: {}", (u32)form);
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue