1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27: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:
Gunnar Beutner 2021-04-29 00:51:54 +02:00 committed by Andreas Kling
parent 278605cde6
commit 9bcdbe205b
6 changed files with 18 additions and 5 deletions

View file

@ -51,6 +51,12 @@ void AbbreviationsMap::populate_map()
current_attribute_specification.attribute = static_cast<Attribute>(attribute_value);
current_attribute_specification.form = static_cast<AttributeDataForm>(form_value);
if (current_attribute_specification.form == AttributeDataForm::ImplicitConst) {
ssize_t data_value;
abbreviation_stream.read_LEB128_signed(data_value);
current_attribute_specification.value = data_value;
}
if (current_attribute_specification.attribute != Attribute::None) {
abbrevation_entry.attribute_specifications.append(current_attribute_specification);
}