diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-18 12:34:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-18 15:51:13 +0200 |
commit | 07adbf19c4325f9b9ca768eaf6740342e07c9f98 (patch) | |
tree | d522c51cb7102908685faab66bd4852be18de520 /Userland/Libraries/LibDebug | |
parent | ae491717558b5d218faedbbff9353df59b2269af (diff) | |
download | serenity-07adbf19c4325f9b9ca768eaf6740342e07c9f98.zip |
LibDebug: Implement support for AttributeDataForm::Data8
I came across this while analyzing a crash dump for openttd.
Diffstat (limited to 'Userland/Libraries/LibDebug')
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/DIE.cpp | 8 | ||||
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/DIE.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibDebug/Dwarf/DIE.cpp b/Userland/Libraries/LibDebug/Dwarf/DIE.cpp index 5733b33fd5..47160cf5d2 100644 --- a/Userland/Libraries/LibDebug/Dwarf/DIE.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/DIE.cpp @@ -131,6 +131,14 @@ DIE::AttributeValue DIE::get_attribute_value(AttributeDataForm form, value.data.as_u32 = data; break; } + case AttributeDataForm::Data8: { + u64 data; + debug_info_stream >> data; + VERIFY(!debug_info_stream.has_any_error()); + value.type = AttributeValue::Type::LongUnsignedNumber; + value.data.as_u64 = data; + break; + } case AttributeDataForm::Ref4: { u32 data; debug_info_stream >> data; diff --git a/Userland/Libraries/LibDebug/Dwarf/DIE.h b/Userland/Libraries/LibDebug/Dwarf/DIE.h index 3ba68eafa8..a1f4a278e8 100644 --- a/Userland/Libraries/LibDebug/Dwarf/DIE.h +++ b/Userland/Libraries/LibDebug/Dwarf/DIE.h @@ -46,6 +46,7 @@ public: enum class Type : u8 { UnsignedNumber, SignedNumber, + LongUnsignedNumber, String, DieReference, // Reference to another DIE in the same compilation unit Boolean, @@ -57,6 +58,7 @@ public: union { u32 as_u32; i32 as_i32; + u64 as_u64; const char* as_string; // points to bytes in the memory mapped elf image bool as_bool; struct { |