1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:47:35 +00:00

LibDebug: Support DW_FORM_ref_udata

This is used alongside/instead of the fixed-length DW_FORM_ref4 form
when compiling for AArch64.
This commit is contained in:
Daniel Bertalan 2023-04-22 16:58:22 +02:00 committed by Andreas Kling
parent d205814da6
commit ed13b7beb6

View file

@ -161,6 +161,13 @@ ErrorOr<AttributeValue> DwarfInfo::get_attribute_value(AttributeDataForm form, s
value.m_data.as_unsigned = data + unit->offset();
break;
}
case AttributeDataForm::RefUData: {
auto data = TRY(debug_info_stream.read_value<LEB128<size_t>>());
value.m_type = AttributeValue::Type::DieReference;
VERIFY(unit);
value.m_data.as_unsigned = data + unit->offset();
break;
}
case AttributeDataForm::FlagPresent: {
value.m_type = AttributeValue::Type::Boolean;
value.m_data.as_bool = true;