1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +00:00

LibDebug: Use DW_AT_ranges to get address ranges of DIEs

Previously, we only supported DIEs with a contiguous address ranges and
ignored ones with a non-contiguous set of ranges.

We now check if a DIE has the DW_AT_ranges attribute, and if it does we
parse its range list.

This improves the quality of our backtraces - we previously missed many
inlined function calls because their DIEs had non-contigues address
ranges.
This commit is contained in:
Itamar 2021-09-28 13:35:28 +03:00 committed by Andreas Kling
parent 26a96d315d
commit 09153b8997
2 changed files with 18 additions and 2 deletions

View file

@ -30,6 +30,7 @@ public:
ReadonlyBytes abbreviation_data() const { return m_abbreviation_data; }
ReadonlyBytes debug_strings_data() const { return m_debug_strings_data; }
ReadonlyBytes debug_line_strings_data() const { return m_debug_line_strings_data; }
ReadonlyBytes debug_range_lists_data() const { return m_debug_range_lists_data; }
template<typename Callback>
void for_each_compilation_unit(Callback) const;
@ -58,6 +59,7 @@ private:
ReadonlyBytes m_debug_strings_data;
ReadonlyBytes m_debug_line_data;
ReadonlyBytes m_debug_line_strings_data;
ReadonlyBytes m_debug_range_lists_data;
NonnullOwnPtrVector<Dwarf::CompilationUnit> m_compilation_units;