LibDebug:: Add DwarfInfo::get_die_at_address

This function returns the die object whose address range intersects
with the given address.

This function will also construct the DIE cache, if it hasn't been
constructed yet.
This commit is contained in:
Itamar 2021-06-19 11:59:48 +03:00 committed by Andreas Kling
commit fb31aae20d
Notes: sideshowbarker 2024-07-18 12:01:18 +09:00
2 changed files with 22 additions and 0 deletions

View file

@ -37,6 +37,8 @@ public:
AttributeValue get_attribute_value(AttributeDataForm form, ssize_t implicit_const_value,
InputMemoryStream& debug_info_stream, const CompilationUnit* unit = nullptr) const;
Optional<DIE> get_die_at_address(FlatPtr) const;
private:
void populate_compilation_units();
void build_cached_dies() const;