From a59b9357e38bb81478dd2fc71ec2c44882492940 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Mon, 26 Jul 2021 18:08:16 +0200 Subject: [PATCH] LibDebug: Keep track of 'prologue end' This LineProgram instruction is emitted by Clang. Although we currently have no use for it (it's mostly a debugger feature), we need to handle this opcode, as otherwise CrashReporter wouldn't work. --- Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp | 5 +++++ Userland/Libraries/LibDebug/Dwarf/LineProgram.h | 1 + 2 files changed, 6 insertions(+) diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp index 86106dfb14..821d850608 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp @@ -246,6 +246,10 @@ void LineProgram::handle_standard_opcode(u8 opcode) m_basic_block = true; break; } + case StandardOpcodes::SetProlougeEnd: { + m_prologue_end = true; + break; + } default: dbgln("Unhandled LineProgram opcode {}", opcode); VERIFY_NOT_REACHED(); @@ -268,6 +272,7 @@ void LineProgram::handle_special_opcode(u8 opcode) append_to_line_info(); m_basic_block = false; + m_prologue_end = false; } void LineProgram::run_program() diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h index d5fc9cacc2..ed6f01bd08 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h @@ -181,6 +181,7 @@ private: size_t m_file_index { 0 }; bool m_is_statement { false }; bool m_basic_block { false }; + bool m_prologue_end { false }; Vector m_lines; };