diff options
Diffstat (limited to 'dwarf_wrappers.h')
-rw-r--r-- | dwarf_wrappers.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dwarf_wrappers.h b/dwarf_wrappers.h index 54ab8fd4..766abb6d 100644 --- a/dwarf_wrappers.h +++ b/dwarf_wrappers.h @@ -103,6 +103,16 @@ public: }; +// Look up the DIE for a reference-form attribute name +inline Dwarf_Die * +dwarf_attr_die (Dwarf_Die *die, unsigned int attr, Dwarf_Die *result) +{ + Dwarf_Attribute attr_mem; + return dwarf_formref_die (dwarf_attr_integrate (die, attr, &attr_mem), + result); +} + + #if !_ELFUTILS_PREREQ(0, 143) // Elfutils prior to 0.143 didn't use attr_integrate when looking up the // decl_file or decl_line, so the attributes would sometimes be missed. For @@ -118,6 +128,11 @@ int dwarf_decl_line_integrate (Dwarf_Die *die, int *linep) #endif // !_ELFUTILS_PREREQ(0, 143) +// Resolve a full name for dwarf types +bool dwarf_type_name(Dwarf_Die *type_die, std::string& type_name); +std::string dwarf_type_name(Dwarf_Die *type_die); + + #endif /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ |