aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-11-09 01:23:30 +0000
committerJason Molenda <jmolenda@apple.com>1999-11-09 01:23:30 +0000
commit11cf87416416e13eff634a70b4954fe6a3912720 (patch)
treea6dc7a21bb3d45b89c3f95e4b5862ec9d2fab83b /gdb/target.h
parent98007ce7b0dea06f0c04d833d39b5a9c9773a07a (diff)
downloadgdb-11cf87416416e13eff634a70b4954fe6a3912720.zip
gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.gz
gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.bz2
import gdb-1999-11-08 snapshot
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 7fc9e86..9a853cf 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -755,8 +755,7 @@ print_section_info PARAMS ((struct target_ops *, bfd *));
not only bring new code into the target process, but also to update
GDB's symbol tables to match. */
-#define target_load(arg, from_tty) \
- (*current_target.to_load) (arg, from_tty)
+extern void target_load (char *arg, int from_tty);
/* Look up a symbol in the target's symbol table. NAME is the symbol
name. ADDRP is a CORE_ADDR * pointing to where the value of the symbol
@@ -1063,10 +1062,30 @@ extern char *normal_pid_to_str PARAMS ((int pid));
extern char *normal_pid_to_str PARAMS ((int pid));
#endif
+/*
+ * New Objfile Event Hook:
+ *
+ * Sometimes a GDB component wants to get notified whenever a new
+ * objfile is loaded. Mainly this is used by thread-debugging
+ * implementations that need to know when symbols for the target
+ * thread implemenation are available.
+ *
+ * The old way of doing this is to define a macro 'target_new_objfile'
+ * that points to the function that you want to be called on every
+ * objfile/shlib load.
+ *
+ * The new way is to grab the function pointer, 'target_new_objfile_hook',
+ * and point it to the function that you want to be called on every
+ * objfile/shlib load.
+ *
+ * If multiple clients are willing to be cooperative, they can each
+ * save a pointer to the previous value of target_new_objfile_hook
+ * before modifying it, and arrange for their function to call the
+ * previous function in the chain. In that way, multiple clients
+ * can receive this notification (something like with signal handlers).
+ */
-#ifndef target_new_objfile
-#define target_new_objfile(OBJFILE)
-#endif
+extern void (*target_new_objfile_hook) PARAMS ((struct objfile *));
#ifndef target_pid_or_tid_to_str
#define target_pid_or_tid_to_str(ID) \
@@ -1338,7 +1357,7 @@ extern void push_remote_target PARAMS ((char *name, int from_tty));
#ifndef SOFTWARE_SINGLE_STEP_P
#define SOFTWARE_SINGLE_STEP_P 0
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) abort ()
+#define SOFTWARE_SINGLE_STEP(sig,bp_p) (internal_error ("SOFTWARE_SINGLE_STEP"), 0)
#endif /* SOFTWARE_SINGLE_STEP_P */
/* Blank target vector entries are initialized to target_ignore. */