diff --git a/Libraries/LibDebug/DebugInfo.cpp b/Libraries/LibDebug/DebugInfo.cpp index 0b5d98bbe1..14ee1cf0e4 100644 --- a/Libraries/LibDebug/DebugInfo.cpp +++ b/Libraries/LibDebug/DebugInfo.cpp @@ -186,7 +186,7 @@ NonnullOwnPtr DebugInfo::create_variable_info(const Dwa if (type_name.has_value()) { variable_info->type = type_name.value().data.as_string; } else { - dbg() << "Unnamed DWRAF type at offset: " << type_die.offset(); + dbg() << "Unnamed DWARF type at offset: " << type_die.offset(); variable_info->name = "[Unnamed Type]"; } diff --git a/Libraries/LibDebug/DebugInfo.h b/Libraries/LibDebug/DebugInfo.h index 51a5b62b9c..06289c76e7 100644 --- a/Libraries/LibDebug/DebugInfo.h +++ b/Libraries/LibDebug/DebugInfo.h @@ -68,7 +68,7 @@ public: struct VariablesScope { bool is_function { false }; - Optional name; + String name; u32 address_low { 0 }; u32 address_high { 0 }; Vector dies_of_variables; diff --git a/Libraries/LibDebug/Dwarf/DIE.h b/Libraries/LibDebug/Dwarf/DIE.h index ec37443117..3f40551147 100644 --- a/Libraries/LibDebug/Dwarf/DIE.h +++ b/Libraries/LibDebug/Dwarf/DIE.h @@ -37,7 +37,7 @@ namespace Dwarf { class CompilationUnit; -// DIE = Dwarf Information Entry +// DIE = Debugging Information Entry class DIE { public: DIE(const CompilationUnit&, u32 offset); diff --git a/Libraries/LibDebug/Dwarf/DwarfInfo.cpp b/Libraries/LibDebug/Dwarf/DwarfInfo.cpp index c04e4b8a72..8c8781e6db 100644 --- a/Libraries/LibDebug/Dwarf/DwarfInfo.cpp +++ b/Libraries/LibDebug/Dwarf/DwarfInfo.cpp @@ -42,7 +42,7 @@ ByteBuffer DwarfInfo::section_data(const String& section_name) { auto section = m_elf->image().lookup_section(section_name); ASSERT(!section.is_undefined()); - return ByteBuffer::wrap(reinterpret_cast(section.raw_data()), section.size()); + return section.wrapping_byte_buffer(); } void DwarfInfo::populate_compilation_units() diff --git a/Libraries/LibDebug/Dwarf/DwarfInfo.h b/Libraries/LibDebug/Dwarf/DwarfInfo.h index 1dc5de1845..c4c7dbb11c 100644 --- a/Libraries/LibDebug/Dwarf/DwarfInfo.h +++ b/Libraries/LibDebug/Dwarf/DwarfInfo.h @@ -38,7 +38,7 @@ namespace Dwarf { class DwarfInfo : public RefCounted { public: - static NonnullRefPtr create(NonnullRefPtr elf) { return adopt(*new DwarfInfo(elf)); } + static NonnullRefPtr create(NonnullRefPtr elf) { return adopt(*new DwarfInfo(move(elf))); } const ByteBuffer& debug_info_data() const { return m_debug_info_data; } const ByteBuffer& abbreviation_data() const { return m_abbreviation_data; }