summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2020-05-06 17:22:41 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-07 23:32:11 +0200
commit5fd64045b11ae2f8461451c6de0c77c8916645b9 (patch)
tree08c7f4d91c2e34c47e76804a4ffc77465db9e9d9 /Libraries
parent42b61cfe2c788704693cb1f550f8f80127884ea5 (diff)
downloadserenity-5fd64045b11ae2f8461451c6de0c77c8916645b9.zip
LibDebug: Miscellaneous fixes from #2097
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibDebug/DebugInfo.cpp2
-rw-r--r--Libraries/LibDebug/DebugInfo.h2
-rw-r--r--Libraries/LibDebug/Dwarf/DIE.h2
-rw-r--r--Libraries/LibDebug/Dwarf/DwarfInfo.cpp2
-rw-r--r--Libraries/LibDebug/Dwarf/DwarfInfo.h2
5 files changed, 5 insertions, 5 deletions
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::VariableInfo> 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<String> name;
+ String name;
u32 address_low { 0 };
u32 address_high { 0 };
Vector<Dwarf::DIE> 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<const u8*>(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<DwarfInfo> {
public:
- static NonnullRefPtr<DwarfInfo> create(NonnullRefPtr<const ELF::Loader> elf) { return adopt(*new DwarfInfo(elf)); }
+ static NonnullRefPtr<DwarfInfo> create(NonnullRefPtr<const ELF::Loader> 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; }