浏览代码

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.
Daniel Bertalan 4 年之前
父节点
当前提交
a59b9357e3
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5 0
      Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp
  2. 1 0
      Userland/Libraries/LibDebug/Dwarf/LineProgram.h

+ 5 - 0
Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp

@@ -246,6 +246,10 @@ void LineProgram::handle_standard_opcode(u8 opcode)
         m_basic_block = true;
         m_basic_block = true;
         break;
         break;
     }
     }
+    case StandardOpcodes::SetProlougeEnd: {
+        m_prologue_end = true;
+        break;
+    }
     default:
     default:
         dbgln("Unhandled LineProgram opcode {}", opcode);
         dbgln("Unhandled LineProgram opcode {}", opcode);
         VERIFY_NOT_REACHED();
         VERIFY_NOT_REACHED();
@@ -268,6 +272,7 @@ void LineProgram::handle_special_opcode(u8 opcode)
     append_to_line_info();
     append_to_line_info();
 
 
     m_basic_block = false;
     m_basic_block = false;
+    m_prologue_end = false;
 }
 }
 
 
 void LineProgram::run_program()
 void LineProgram::run_program()

+ 1 - 0
Userland/Libraries/LibDebug/Dwarf/LineProgram.h

@@ -181,6 +181,7 @@ private:
     size_t m_file_index { 0 };
     size_t m_file_index { 0 };
     bool m_is_statement { false };
     bool m_is_statement { false };
     bool m_basic_block { false };
     bool m_basic_block { false };
+    bool m_prologue_end { false };
 
 
     Vector<LineInfo> m_lines;
     Vector<LineInfo> m_lines;
 };
 };