From a3f2af49f9dee706265016796a80c32076ee5569 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 28 Apr 2021 22:08:13 +0200 Subject: [PATCH] LibDebug: Move UnitHeader32 out of the LineProgram class --- .../Libraries/LibDebug/Dwarf/LineProgram.h | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h index 8cfe29eb1d..a0b92ff3ae 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h @@ -12,6 +12,18 @@ namespace Debug::Dwarf { +struct [[gnu::packed]] LineProgramUnitHeader32 { + u32 length; + u16 version; + u32 header_length; + u8 min_instruction_length; + u8 default_is_stmt; + i8 line_base; + u8 line_range; + u8 opcode_base; + u8 std_opcode_lengths[12]; +}; + class LineProgram { public: explicit LineProgram(InputMemoryStream& stream); @@ -37,18 +49,6 @@ private: void handle_standard_opcode(u8 opcode); void handle_special_opcode(u8 opcode); - struct [[gnu::packed]] UnitHeader32 { - u32 length; - u16 version; - u32 header_length; - u8 min_instruction_length; - u8 default_is_stmt; - i8 line_base; - u8 line_range; - u8 opcode_base; - u8 std_opcode_lengths[12]; - }; - enum StandardOpcodes { Copy = 1, AdvancePc, @@ -82,7 +82,7 @@ private: InputMemoryStream& m_stream; size_t m_unit_offset { 0 }; - UnitHeader32 m_unit_header {}; + LineProgramUnitHeader32 m_unit_header {}; Vector m_source_directories; Vector m_source_files;