1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibDebug: Implement support for DWARF 5 compilation unit headers

This commit is contained in:
Gunnar Beutner 2021-04-28 22:13:58 +02:00 committed by Andreas Kling
parent a3f2af49f9
commit 6b4448b623
4 changed files with 54 additions and 8 deletions

View file

@ -12,13 +12,14 @@ CompilationUnit::CompilationUnit(const DwarfInfo& dwarf_info, u32 offset, const
: m_dwarf_info(dwarf_info)
, m_offset(offset)
, m_header(header)
, m_abbreviations(dwarf_info, header.abbrev_offset)
, m_abbreviations(dwarf_info, header.abbrev_offset())
{
VERIFY(header.version() < 5 || header.unit_type() == CompilationUnitType::Full);
}
DIE CompilationUnit::root_die() const
{
return DIE(*this, m_offset + sizeof(CompilationUnitHeader));
return DIE(*this, m_offset + m_header.header_size());
}
}