diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-21 18:18:54 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-21 19:08:01 +0200 |
commit | 4a572df465ff8e1d912f52ab1a19a07a1f3aadd7 (patch) | |
tree | c7844b0247864f3f25890853378803a07eca1bdf /Libraries/LibDebug/DebugInfo.cpp | |
parent | 0e172f8ed789fec538a7f6891c95ed517b406cfe (diff) | |
download | serenity-4a572df465ff8e1d912f52ab1a19a07a1f3aadd7.zip |
LibDebug: Put DWARF debug logging spam behind DEBUG_SPAM
With this logging enabled, it takes way too long to load debug info.
Diffstat (limited to 'Libraries/LibDebug/DebugInfo.cpp')
-rw-r--r-- | Libraries/LibDebug/DebugInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibDebug/DebugInfo.cpp b/Libraries/LibDebug/DebugInfo.cpp index 4bff5b8843..250b6902a4 100644 --- a/Libraries/LibDebug/DebugInfo.cpp +++ b/Libraries/LibDebug/DebugInfo.cpp @@ -30,6 +30,8 @@ #include <LibDebug/Dwarf/DwarfInfo.h> #include <LibDebug/Dwarf/Expression.h> +//#define DEBUG_SPAM + DebugInfo::DebugInfo(NonnullRefPtr<const ELF::Loader> elf) : m_elf(elf) , m_dwarf_info(Dwarf::DwarfInfo::create(m_elf)) @@ -55,11 +57,15 @@ void DebugInfo::parse_scopes_impl(const Dwarf::DIE& die) return; if (child.get_attribute(Dwarf::Attribute::Inline).has_value()) { +#ifdef DEBUG_SPAM dbg() << "DWARF inlined functions are not supported"; +#endif return; } if (child.get_attribute(Dwarf::Attribute::Ranges).has_value()) { +#ifdef DEBUG_SPAM dbg() << "DWARF ranges are not supported"; +#endif return; } auto name = child.get_attribute(Dwarf::Attribute::Name); @@ -70,7 +76,9 @@ void DebugInfo::parse_scopes_impl(const Dwarf::DIE& die) scope.name = name.value().data.as_string; if (!child.get_attribute(Dwarf::Attribute::LowPc).has_value()) { +#ifdef DEBUG_SPAM dbg() << "DWARF: Couldn't find attribtue LowPc for scope"; +#endif return; } scope.address_low = child.get_attribute(Dwarf::Attribute::LowPc).value().data.as_u32; |