aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>1999-01-15 17:30:25 +0000
committerFernando Nasser <fnasser@redhat.com>1999-01-15 17:30:25 +0000
commit7269d43e106ea7ff25cb60fe253ae17db78d8c07 (patch)
treeb29bf527b7f48dd3793ecf6a99ba96bd3b8de164 /gdb/target.c
parenta68e7120b11f384e80b0329653f5d9b87a1084b9 (diff)
downloadgdb-7269d43e106ea7ff25cb60fe253ae17db78d8c07.zip
gdb-7269d43e106ea7ff25cb60fe253ae17db78d8c07.tar.gz
gdb-7269d43e106ea7ff25cb60fe253ae17db78d8c07.tar.bz2
1999-01-15 Fernando Nasser <fnasser@totem.to.cygnus.com>
* target.h: added entry for target queries (to_query) target.c: ditto.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 1e729fa..a13bbc3 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -172,6 +172,9 @@ debug_to_thread_alive PARAMS ((int));
static void
debug_to_stop PARAMS ((void));
+static int
+debug_to_query PARAMS ((char, char *, char *, int *));
+
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
array. */
@@ -237,6 +240,7 @@ struct target_ops dummy_target = {
0, /* to_notice_signals */
0, /* to_thread_alive */
0, /* to_stop */
+ 0, /* to_query */
NULL, /* to_enable_exception_callback */
NULL, /* to_get_current_exception_event */
NULL, /* to_pid_to_exec_file */
@@ -502,6 +506,7 @@ cleanup_target (t)
de_fault (to_notice_signals, (void (*) PARAMS((int))) target_ignore);
de_fault (to_thread_alive, (int (*) PARAMS((int))) target_ignore);
de_fault (to_stop, (void (*) PARAMS((void))) target_ignore);
+ de_fault (to_query, (int (*) PARAMS((char, char*, char *, int *))) target_ignore);
de_fault (to_enable_exception_callback, (struct symtab_and_line * (*) PARAMS((enum exception_event_kind, int))) nosupport_runtime);
de_fault (to_get_current_exception_event, (struct exception_event_record * (*) PARAMS((void))) nosupport_runtime);
@@ -583,6 +588,7 @@ update_current_target ()
INHERIT (to_notice_signals, t);
INHERIT (to_thread_alive, t);
INHERIT (to_stop, t);
+ INHERIT (to_query, t);
INHERIT (to_enable_exception_callback, t);
INHERIT (to_get_current_exception_event, t);
INHERIT (to_pid_to_exec_file, t);
@@ -2470,6 +2476,22 @@ debug_to_stop ()
fprintf_unfiltered (gdb_stderr, "target_stop ()\n");
}
+static int
+debug_to_query (type, req, resp, siz)
+ char type;
+ char *req;
+ char *resp;
+ int *siz;
+{
+ int retval;
+
+ retval = debug_target.to_query (type, req, resp, siz);
+
+ fprintf_unfiltered (stderr, "target_query (%c, %s, %s, %d) = %d\n", type, req, resp, *siz, retval);
+
+ return retval;
+}
+
static struct symtab_and_line *
debug_to_enable_exception_callback (kind, enable)
enum exception_event_kind kind;
@@ -2572,6 +2594,7 @@ setup_target_debug ()
current_target.to_notice_signals = debug_to_notice_signals;
current_target.to_thread_alive = debug_to_thread_alive;
current_target.to_stop = debug_to_stop;
+ current_target.to_query = debug_to_query;
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;