mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +00:00
LibDebug: Support addrx*
, strx*
and rnglistx
forms
These forms were introduced in DWARF5, and have a fair deal of advantages over the more traditional encodings: they reduce the size of the binary and the number of relocations. GCC does not emit these with `-g1` by default, but Clang does at all debug levels.
This commit is contained in:
parent
8e5b70a0ba
commit
ac53569bd1
7 changed files with 213 additions and 3 deletions
|
@ -31,19 +31,35 @@ public:
|
|||
DIE root_die() const;
|
||||
DIE get_die_at_offset(u32 offset) const;
|
||||
|
||||
FlatPtr get_address(size_t index) const;
|
||||
char const* get_string(size_t index) const;
|
||||
|
||||
DwarfInfo const& dwarf_info() const { return m_dwarf_info; }
|
||||
AbbreviationsMap const& abbreviations_map() const { return m_abbreviations; }
|
||||
LineProgram const& line_program() const { return *m_line_program; }
|
||||
Optional<FlatPtr> base_address() const;
|
||||
|
||||
// DW_AT_addr_base
|
||||
u64 address_table_base() const;
|
||||
// DW_AT_str_offsets_base
|
||||
u64 string_offsets_base() const;
|
||||
// DW_AT_rnglists_base
|
||||
u64 range_lists_base() const;
|
||||
|
||||
private:
|
||||
DwarfInfo const& m_dwarf_info;
|
||||
u32 m_offset { 0 };
|
||||
CompilationUnitHeader m_header;
|
||||
AbbreviationsMap m_abbreviations;
|
||||
NonnullOwnPtr<LineProgram> m_line_program;
|
||||
mutable bool m_has_cached_base_address { false };
|
||||
mutable bool m_has_cached_base_address : 1 { false };
|
||||
mutable bool m_has_cached_address_table_base : 1 { false };
|
||||
mutable bool m_has_cached_string_offsets_base : 1 { false };
|
||||
mutable bool m_has_cached_range_lists_base : 1 { false };
|
||||
mutable Optional<FlatPtr> m_cached_base_address;
|
||||
mutable u64 m_cached_address_table_base { 0 };
|
||||
mutable u64 m_cached_string_offsets_base { 0 };
|
||||
mutable u64 m_cached_range_lists_base { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue