diff options
author | asynts <asynts@gmail.com> | 2021-01-15 21:46:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-22 22:14:30 +0100 |
commit | 9229ba0fe9b04a7eab116925ecdee4797815281d (patch) | |
tree | 2c9cb9724afebafb545f6e79cfcd62bb0c40f3c5 /Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp | |
parent | 27bc48e06cf54cb826fd8dd46edd9331650f3a63 (diff) | |
download | serenity-9229ba0fe9b04a7eab116925ecdee4797815281d.zip |
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
Diffstat (limited to 'Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp')
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp index 2bc89a885f..180c0f7c95 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp @@ -25,11 +25,10 @@ */ #include "LineProgram.h" +#include <AK/Debug.h> #include <AK/String.h> #include <AK/StringBuilder.h> -//#define DWARF_DEBUG - namespace Debug::Dwarf { LineProgram::LineProgram(InputMemoryStream& stream) @@ -236,10 +235,10 @@ void LineProgram::handle_sepcial_opcode(u8 opcode) m_address += address_increment; m_line += line_increment; -#ifdef DWARF_DEBUG - dbgln("Special adjusted_opcode: {}, address_increment: {}, line_increment: {}", adjusted_opcode, address_increment, line_increment); - dbg() << "Address is now:" << (void*)m_address << ", and line is: " << m_source_files[m_file_index].name << ":" << m_line; -#endif + if constexpr (debug_dwarf) { + dbgln("Special adjusted_opcode: {}, address_increment: {}, line_increment: {}", adjusted_opcode, address_increment, line_increment); + dbgln("Address is now: {:p}, and line is: {}:{}", m_address, m_source_files[m_file_index].name, m_line); + } append_to_line_info(); } @@ -252,9 +251,7 @@ void LineProgram::run_program() u8 opcode = 0; m_stream >> opcode; -#ifdef DWARF_DEBUG - dbg() << (void*)(m_stream.offset() - 1) << ": opcode: " << opcode; -#endif + dbgln<debug_dwarf>("{:p}: opcode: {}", m_stream.offset() - 1, opcode); if (opcode == 0) { handle_extended_opcode(); |