summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index e4e7abfdfe3..a82e8bbbe29 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -69,6 +69,12 @@ struct stap_parse_info;
GDB, this global should be made target-specific. */
extern struct gdbarch *target_gdbarch;
+/* Callback type for the 'iterate_over_objfiles_in_search_order'
+ gdbarch method. */
+
+typedef int (iterate_over_objfiles_in_search_order_cb_ftype)
+ (struct objfile *objfile, void *cb_data);
+
/* The following are pre-initialized by GDBARCH. */
@@ -1175,6 +1181,24 @@ typedef void (gdbarch_info_proc_ftype) (struct gdbarch *gdbarch, char *args, enu
extern void gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what);
extern void set_gdbarch_info_proc (struct gdbarch *gdbarch, gdbarch_info_proc_ftype *info_proc);
+/* Iterate over all objfiles in the order that makes the most sense
+ for the architecture to make global symbol searches.
+
+ CB is a callback function where OBJFILE is the objfile to be searched,
+ and CB_DATA a pointer to user-defined data (the same data that is passed
+ when calling this gdbarch method). The iteration stops if this function
+ returns nonzero.
+
+ CB_DATA is a pointer to some user-defined data to be passed to
+ the callback.
+
+ If not NULL, CURRENT_OBJFILE corresponds to the objfile being
+ inspected when the symbol search was requested. */
+
+typedef void (gdbarch_iterate_over_objfiles_in_search_order_ftype) (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile);
+extern void gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile);
+extern void set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order);
+
/* Definition for an unknown syscall, used basically in error-cases. */
#define UNKNOWN_SYSCALL (-1)