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
commit ed13b7beb6
Notes: sideshowbarker 2024-07-17 07:20:57 +09:00

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;