mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibDebug: Move UnitHeader32 out of the LineProgram class
This commit is contained in:
parent
ea6fdad88b
commit
a3f2af49f9
1 changed files with 13 additions and 13 deletions
|
@ -12,6 +12,18 @@
|
||||||
|
|
||||||
namespace Debug::Dwarf {
|
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 {
|
class LineProgram {
|
||||||
public:
|
public:
|
||||||
explicit LineProgram(InputMemoryStream& stream);
|
explicit LineProgram(InputMemoryStream& stream);
|
||||||
|
@ -37,18 +49,6 @@ private:
|
||||||
void handle_standard_opcode(u8 opcode);
|
void handle_standard_opcode(u8 opcode);
|
||||||
void handle_special_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 {
|
enum StandardOpcodes {
|
||||||
Copy = 1,
|
Copy = 1,
|
||||||
AdvancePc,
|
AdvancePc,
|
||||||
|
@ -82,7 +82,7 @@ private:
|
||||||
InputMemoryStream& m_stream;
|
InputMemoryStream& m_stream;
|
||||||
|
|
||||||
size_t m_unit_offset { 0 };
|
size_t m_unit_offset { 0 };
|
||||||
UnitHeader32 m_unit_header {};
|
LineProgramUnitHeader32 m_unit_header {};
|
||||||
Vector<String> m_source_directories;
|
Vector<String> m_source_directories;
|
||||||
Vector<FileEntry> m_source_files;
|
Vector<FileEntry> m_source_files;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue