summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKen Werner <ken.werner@linaro.org>2011-08-12 09:23:18 +0000
committerKen Werner <ken.werner@linaro.org>2011-08-15 20:12:54 +0200
commit0b9f591823474c9651acdffec68256e077e4d601 (patch)
tree02668fb4be603f12380c0e80554105c8b4bdd51b /include
parent25f6b8295d0427746e2a760bb17e63c0461e47f2 (diff)
downloadlibunwind-0b9f591823474c9651acdffec68256e077e4d601.tar.gz
Make the dwarf dl_iterate_phdr callback available within libunwind.
Rename the dwarf dl_iterate_phdr callback routine and the callback_data structure to dwarf_callback and dwarf_callback_data. Make it available within libunwind by declaring the two at the dwarf.h header file. Signed-off-by: Ken Werner <ken.werner@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/dwarf.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dwarf.h b/include/dwarf.h
index 334aaadc..3fe6b482 100644
--- a/include/dwarf.h
+++ b/include/dwarf.h
@@ -347,8 +347,21 @@ struct unw_debug_frame_list
struct unw_debug_frame_list *next;
};
+struct dwarf_callback_data
+ {
+ /* in: */
+ unw_word_t ip; /* instruction-pointer we're looking for */
+ unw_proc_info_t *pi; /* proc-info pointer */
+ int need_unwind_info;
+ /* out: */
+ int single_fde; /* did we find a single FDE? (vs. a table) */
+ unw_dyn_info_t di; /* table info (if single_fde is false) */
+ unw_dyn_info_t di_debug; /* additional table info for .debug_frame */
+ };
+
/* Convenience macros: */
#define dwarf_init UNW_ARCH_OBJ (dwarf_init)
+#define dwarf_callback UNW_OBJ (dwarf_callback)
#define dwarf_find_proc_info UNW_OBJ (dwarf_find_proc_info)
#define dwarf_find_debug_frame UNW_OBJ (dwarf_find_debug_frame)
#define dwarf_search_unwind_table UNW_OBJ (dwarf_search_unwind_table)
@@ -364,6 +377,7 @@ struct unw_debug_frame_list
#define dwarf_step UNW_OBJ (dwarf_step)
extern int dwarf_init (void);
+extern int dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr);
extern int dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip,
unw_proc_info_t *pi,
int need_unwind_info, void *arg);