diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2023-04-22 16:58:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-23 14:30:59 +0200 |
commit | ed13b7beb6eb2342486d1ee1ecbbb0c6405e2afa (patch) | |
tree | efa81ac26212054a729448480319089fe5012c55 /Userland/Libraries/LibDebug/Dwarf | |
parent | d205814da672985e26db40e9dc3962c6222834a0 (diff) | |
download | serenity-ed13b7beb6eb2342486d1ee1ecbbb0c6405e2afa.zip |
LibDebug: Support DW_FORM_ref_udata
This is used alongside/instead of the fixed-length DW_FORM_ref4 form
when compiling for AArch64.
Diffstat (limited to 'Userland/Libraries/LibDebug/Dwarf')
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp index 6d52ecf8b7..96bb4df27c 100644 --- a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp @@ -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; |