diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-17 21:34:48 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:45:56 -0700 |
commit | 1aac633be67ac452b4e8948362549f8760a19af0 (patch) | |
tree | 594094722119f3c1022f3c4b910a5aebdf397ff6 /gdb | |
parent | 1eab8a48bf928ab7337833c785ec1316edbdbc8a (diff) | |
download | gdb-1aac633be67ac452b4e8948362549f8760a19af0.zip gdb-1aac633be67ac452b4e8948362549f8760a19af0.tar.gz gdb-1aac633be67ac452b4e8948362549f8760a19af0.tar.bz2 |
Add target_ops argument to to_rcmd
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_rcmd>: Add argument.
(target_rcmd): Add argument.
* target.c (debug_to_rcmd): Add argument.
(update_current_target, do_monitor_command): Update.
* remote.c (remote_rcmd): Add 'self' argument.
* monitor.c (monitor_rcmd): Add 'self' argument.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/monitor.c | 2 | ||||
-rw-r--r-- | gdb/remote.c | 2 | ||||
-rw-r--r-- | gdb/target.c | 11 | ||||
-rw-r--r-- | gdb/target.h | 5 |
5 files changed, 20 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 82a81bc..09b88f7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,14 @@ 2014-02-19 Tom Tromey <tromey@redhat.com> + * target.h (struct target_ops) <to_rcmd>: Add argument. + (target_rcmd): Add argument. + * target.c (debug_to_rcmd): Add argument. + (update_current_target, do_monitor_command): Update. + * remote.c (remote_rcmd): Add 'self' argument. + * monitor.c (monitor_rcmd): Add 'self' argument. + +2014-02-19 Tom Tromey <tromey@redhat.com> + * windows-nat.c (windows_stop): Add 'self' argument. * target.h (struct target_ops) <to_stop>: Add argument. * target.c (target_stop): Add argument. diff --git a/gdb/monitor.c b/gdb/monitor.c index 06735dc..c46e2df 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -2281,7 +2281,7 @@ monitor_stop (struct target_ops *self, ptid_t ptid) ourseleves here cause of a nasty echo. */ static void -monitor_rcmd (char *command, +monitor_rcmd (struct target_ops *self, char *command, struct ui_file *outbuf) { char *p; diff --git a/gdb/remote.c b/gdb/remote.c index 35f4297..0a80502 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -8962,7 +8962,7 @@ remote_search_memory (struct target_ops* ops, } static void -remote_rcmd (char *command, +remote_rcmd (struct target_ops *self, char *command, struct ui_file *outbuf) { struct remote_state *rs = get_remote_state (); diff --git a/gdb/target.c b/gdb/target.c index 9b8e1e9..3850494 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -828,7 +828,7 @@ update_current_target (void) (void (*) (struct target_ops *, ptid_t)) target_ignore); de_fault (to_rcmd, - (void (*) (char *, struct ui_file *)) + (void (*) (struct target_ops *, char *, struct ui_file *)) tcomplain); de_fault (to_pid_to_exec_file, (char *(*) (int)) @@ -4996,10 +4996,10 @@ debug_to_stop (struct target_ops *self, ptid_t ptid) } static void -debug_to_rcmd (char *command, +debug_to_rcmd (struct target_ops *self, char *command, struct ui_file *outbuf) { - debug_target.to_rcmd (command, outbuf); + debug_target.to_rcmd (&debug_target, command, outbuf); fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); } @@ -5075,10 +5075,11 @@ do_monitor_command (char *cmd, int from_tty) { if ((current_target.to_rcmd - == (void (*) (char *, struct ui_file *)) tcomplain) + == (void (*) (struct target_ops *, char *, struct ui_file *)) tcomplain) || (current_target.to_rcmd == debug_to_rcmd && (debug_target.to_rcmd - == (void (*) (char *, struct ui_file *)) tcomplain))) + == (void (*) (struct target_ops *, + char *, struct ui_file *)) tcomplain))) error (_("\"monitor\" command not supported by this target.")); target_rcmd (cmd, gdb_stdtarg); } diff --git a/gdb/target.h b/gdb/target.h index 3c2bf80..af8d834 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -525,7 +525,8 @@ struct target_ops char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *); char *(*to_thread_name) (struct target_ops *, struct thread_info *); void (*to_stop) (struct target_ops *, ptid_t); - void (*to_rcmd) (char *command, struct ui_file *output); + void (*to_rcmd) (struct target_ops *, + char *command, struct ui_file *output); char *(*to_pid_to_exec_file) (int pid); void (*to_log_command) (const char *); struct target_section_table *(*to_get_section_table) (struct target_ops *); @@ -1434,7 +1435,7 @@ extern void target_stop (ptid_t ptid); placed in OUTBUF. */ #define target_rcmd(command, outbuf) \ - (*current_target.to_rcmd) (command, outbuf) + (*current_target.to_rcmd) (¤t_target, command, outbuf) /* Does the target include all of memory, or only part of it? This |