diff options
author | obrien <obrien@FreeBSD.org> | 2011-05-07 01:05:31 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2011-05-07 01:05:31 +0000 |
commit | 3a533dcf25ee60b843e4e6c6c10a76fd603629c8 (patch) | |
tree | ed859674e81264f55de2412db17619c8de1fee86 /lib/libdwarf/_libdwarf.h | |
parent | e97ce6dc83fc8850d25f1c57197b68ff3586254e (diff) | |
download | FreeBSD-src-3a533dcf25ee60b843e4e6c6c10a76fd603629c8.zip FreeBSD-src-3a533dcf25ee60b843e4e6c6c10a76fd603629c8.tar.gz |
Add the ability to search for all the inlined instances of a given function.
Reviewed by: jb
Obtained from: Juniper Networks
Diffstat (limited to 'lib/libdwarf/_libdwarf.h')
-rw-r--r-- | lib/libdwarf/_libdwarf.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/libdwarf/_libdwarf.h b/lib/libdwarf/_libdwarf.h index 697b034..828250e 100644 --- a/lib/libdwarf/_libdwarf.h +++ b/lib/libdwarf/_libdwarf.h @@ -163,6 +163,37 @@ struct _Dwarf_Debug { dbg_cu; /* List of compilation units. */ Dwarf_CU dbg_cu_current; /* Ptr to the current compilation unit. */ + + STAILQ_HEAD(, _Dwarf_Func) dbg_func; /* List of functions */ +}; + +struct _Dwarf_Func { + Dwarf_Die func_die; + const char *func_name; + Dwarf_Addr func_low_pc; + Dwarf_Addr func_high_pc; + int func_is_inlined; + /* inlined instance */ + STAILQ_HEAD(, _Dwarf_Inlined_Func) func_inlined_instances; + STAILQ_ENTRY(_Dwarf_Func) func_next; }; +struct _Dwarf_Inlined_Func { + struct _Dwarf_Func *ifunc_origin; + Dwarf_Die ifunc_abstract; + Dwarf_Die ifunc_concrete; + Dwarf_Addr ifunc_low_pc; + Dwarf_Addr ifunc_high_pc; + STAILQ_ENTRY(_Dwarf_Inlined_Func) ifunc_next; +}; + +void dwarf_build_function_table(Dwarf_Debug dbg); + +#ifdef DWARF_DEBUG +#include <assert.h> +#define DWARF_ASSERT(x) assert(x) +#else +#define DWARF_ASSERT(x) +#endif + #endif /* !__LIBDWARF_H_ */ |