diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-17 21:34:36 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:45:55 -0700 |
commit | 1eab8a48bf928ab7337833c785ec1316edbdbc8a (patch) | |
tree | 9905d4d243662da8ae2aa4fb66c9a99dbf65c534 | |
parent | 503a628d9bced852eb0d5da7eac40fa560c26b17 (diff) | |
download | gdb-1eab8a48bf928ab7337833c785ec1316edbdbc8a.zip gdb-1eab8a48bf928ab7337833c785ec1316edbdbc8a.tar.gz gdb-1eab8a48bf928ab7337833c785ec1316edbdbc8a.tar.bz2 |
Add target_ops argument to to_stop
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.
(debug_to_stop): Add argument.
(update_current_target): Update.
* remote.c (remote_stop): Add 'self' argument.
* remote-sim.c (gdbsim_stop): Add 'self' argument.
(gdbsim_cntrl_c): Update.
* remote-m32r-sdi.c (m32r_stop): Add 'self' argument.
* procfs.c (procfs_stop): Add 'self' argument.
* nto-procfs.c (procfs_stop): Add 'self' argument.
* monitor.c (monitor_stop): Add 'self' argument.
(monitor_open): Update.
* linux-nat.c (linux_nat_stop): Add argument.
* inf-ptrace.c (inf_ptrace_stop): Add 'self' argument.
* gnu-nat.c (gnu_stop): Add 'self' argument.
* darwin-nat.c (darwin_stop): Add 'self' argument.
-rw-r--r-- | gdb/ChangeLog | 20 | ||||
-rw-r--r-- | gdb/darwin-nat.c | 4 | ||||
-rw-r--r-- | gdb/gnu-nat.c | 2 | ||||
-rw-r--r-- | gdb/inf-ptrace.c | 2 | ||||
-rw-r--r-- | gdb/linux-nat.c | 4 | ||||
-rw-r--r-- | gdb/monitor.c | 6 | ||||
-rw-r--r-- | gdb/nto-procfs.c | 2 | ||||
-rw-r--r-- | gdb/procfs.c | 4 | ||||
-rw-r--r-- | gdb/remote-m32r-sdi.c | 2 | ||||
-rw-r--r-- | gdb/remote-sim.c | 6 | ||||
-rw-r--r-- | gdb/remote.c | 4 | ||||
-rw-r--r-- | gdb/target.c | 10 | ||||
-rw-r--r-- | gdb/target.h | 2 | ||||
-rw-r--r-- | gdb/windows-nat.c | 4 |
14 files changed, 46 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b84620f..82a81bc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,25 @@ 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. + (debug_to_stop): Add argument. + (update_current_target): Update. + * remote.c (remote_stop): Add 'self' argument. + * remote-sim.c (gdbsim_stop): Add 'self' argument. + (gdbsim_cntrl_c): Update. + * remote-m32r-sdi.c (m32r_stop): Add 'self' argument. + * procfs.c (procfs_stop): Add 'self' argument. + * nto-procfs.c (procfs_stop): Add 'self' argument. + * monitor.c (monitor_stop): Add 'self' argument. + (monitor_open): Update. + * linux-nat.c (linux_nat_stop): Add argument. + * inf-ptrace.c (inf_ptrace_stop): Add 'self' argument. + * gnu-nat.c (gnu_stop): Add 'self' argument. + * darwin-nat.c (darwin_stop): Add 'self' argument. + +2014-02-19 Tom Tromey <tromey@redhat.com> + * target.h (struct target_ops) <to_thread_name>: Add argument. * target.c (target_thread_name): Add argument. (update_current_target): Update. diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 47483bf..9027010 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -87,7 +87,7 @@ extern boolean_t exc_server (mach_msg_header_t *in, mach_msg_header_t *out); -static void darwin_stop (ptid_t); +static void darwin_stop (struct target_ops *self, ptid_t); static void darwin_resume_to (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signal); @@ -1144,7 +1144,7 @@ darwin_wait_to (struct target_ops *ops, } static void -darwin_stop (ptid_t t) +darwin_stop (struct target_ops *self, ptid_t t) { struct inferior *inf = current_inferior (); diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 88216a1..b226498 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2264,7 +2264,7 @@ gnu_terminal_init_inferior (struct target_ops *self) } static void -gnu_stop (ptid_t ptid) +gnu_stop (struct target_ops *self, ptid_t ptid) { error (_("to_stop target function not implemented")); } diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 048b158..bffb4ba 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -321,7 +321,7 @@ inf_ptrace_kill (struct target_ops *ops) /* Stop the inferior. */ static void -inf_ptrace_stop (ptid_t ptid) +inf_ptrace_stop (struct target_ops *self, ptid_t ptid) { /* Send a SIGINT to the process group. This acts just like the user typed a ^C on the controlling terminal. Note that using a diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index dca4552..50eef3a 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4781,12 +4781,12 @@ linux_nat_stop_lwp (struct lwp_info *lwp, void *data) } static void -linux_nat_stop (ptid_t ptid) +linux_nat_stop (struct target_ops *self, ptid_t ptid) { if (non_stop) iterate_over_lwps (ptid, linux_nat_stop_lwp, NULL); else - linux_ops->to_stop (ptid); + linux_ops->to_stop (linux_ops, ptid); } static void diff --git a/gdb/monitor.c b/gdb/monitor.c index 6061a85..06735dc 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -61,7 +61,7 @@ static struct target_ops *targ_ops; static void monitor_interrupt_query (void); static void monitor_interrupt_twice (int); -static void monitor_stop (ptid_t); +static void monitor_stop (struct target_ops *self, ptid_t); static void monitor_dump_regs (struct regcache *regcache); #if 0 @@ -783,7 +783,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty) if (current_monitor->stop) { - monitor_stop (inferior_ptid); + monitor_stop (targ_ops, inferior_ptid); if ((current_monitor->flags & MO_NO_ECHO_ON_OPEN) == 0) { monitor_debug ("EXP Open echo\n"); @@ -2267,7 +2267,7 @@ monitor_load (struct target_ops *self, char *args, int from_tty) } static void -monitor_stop (ptid_t ptid) +monitor_stop (struct target_ops *self, ptid_t ptid) { monitor_debug ("MON stop\n"); if ((current_monitor->flags & MO_SEND_BREAK_ON_STOP) != 0) diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 5fedb90..1b2b2ff 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -1218,7 +1218,7 @@ procfs_create_inferior (struct target_ops *ops, char *exec_file, } static void -procfs_stop (ptid_t ptid) +procfs_stop (struct target_ops *self, ptid_t ptid) { devctl (ctl_fd, DCMD_PROC_STOP, NULL, 0, 0); } diff --git a/gdb/procfs.c b/gdb/procfs.c index bbe29f2..575984c 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -113,7 +113,7 @@ static void procfs_attach (struct target_ops *, char *, int); static void procfs_detach (struct target_ops *, const char *, int); static void procfs_resume (struct target_ops *, ptid_t, int, enum gdb_signal); -static void procfs_stop (ptid_t); +static void procfs_stop (struct target_ops *self, ptid_t); static void procfs_files_info (struct target_ops *); static void procfs_fetch_registers (struct target_ops *, struct regcache *, int); @@ -4265,7 +4265,7 @@ procfs_files_info (struct target_ops *ignore) kill(SIGINT) to the child's process group. */ static void -procfs_stop (ptid_t ptid) +procfs_stop (struct target_ops *self, ptid_t ptid) { kill (-inferior_process_group (), SIGINT); } diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 0af8cfc..02a812a 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -1391,7 +1391,7 @@ m32r_load (struct target_ops *self, char *args, int from_tty) } static void -m32r_stop (ptid_t ptid) +m32r_stop (struct target_ops *self, ptid_t ptid) { if (remote_debug) fprintf_unfiltered (gdb_stdlog, "m32r_stop()\n"); diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 65da8f7..0614690 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -88,7 +88,7 @@ static void gdbsim_files_info (struct target_ops *target); static void gdbsim_mourn_inferior (struct target_ops *target); -static void gdbsim_stop (ptid_t ptid); +static void gdbsim_stop (struct target_ops *self, ptid_t ptid); void simulator_command (char *args, int from_tty); @@ -919,7 +919,7 @@ gdbsim_stop_inferior (struct inferior *inf, void *arg) } static void -gdbsim_stop (ptid_t ptid) +gdbsim_stop (struct target_ops *self, ptid_t ptid) { struct sim_inferior_data *sim_data; @@ -963,7 +963,7 @@ gdb_os_poll_quit (host_callback *p) static void gdbsim_cntrl_c (int signo) { - gdbsim_stop (minus_one_ptid); + gdbsim_stop (NULL, minus_one_ptid); } static ptid_t diff --git a/gdb/remote.c b/gdb/remote.c index 002a9a2..35f4297 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -153,7 +153,7 @@ static void init_remote_ops (void); static void init_extended_remote_ops (void); -static void remote_stop (ptid_t); +static void remote_stop (struct target_ops *self, ptid_t); static int stubhex (int ch); @@ -5085,7 +5085,7 @@ remote_stop_as (ptid_t ptid) will eventually end up here. */ static void -remote_stop (ptid_t ptid) +remote_stop (struct target_ops *self, ptid_t ptid) { if (remote_debug) fprintf_unfiltered (gdb_stdlog, "remote_stop called\n"); diff --git a/gdb/target.c b/gdb/target.c index 03e4fe4..9b8e1e9 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -146,7 +146,7 @@ static void debug_to_load (struct target_ops *self, char *, int); static int debug_to_can_run (struct target_ops *self); -static void debug_to_stop (ptid_t); +static void debug_to_stop (struct target_ops *self, ptid_t); /* Pointer to array of target architecture structures; the size of the array; the current index into the array; the allocated size of the @@ -825,7 +825,7 @@ update_current_target (void) (char *(*) (struct target_ops *, struct thread_info *)) return_null); de_fault (to_stop, - (void (*) (ptid_t)) + (void (*) (struct target_ops *, ptid_t)) target_ignore); de_fault (to_rcmd, (void (*) (char *, struct ui_file *)) @@ -3925,7 +3925,7 @@ target_stop (ptid_t ptid) return; } - (*current_target.to_stop) (ptid); + (*current_target.to_stop) (¤t_target, ptid); } static void @@ -4987,9 +4987,9 @@ debug_to_thread_architecture (struct target_ops *ops, ptid_t ptid) } static void -debug_to_stop (ptid_t ptid) +debug_to_stop (struct target_ops *self, ptid_t ptid) { - debug_target.to_stop (ptid); + debug_target.to_stop (&debug_target, ptid); fprintf_unfiltered (gdb_stdlog, "target_stop (%s)\n", target_pid_to_str (ptid)); diff --git a/gdb/target.h b/gdb/target.h index d225802..3c2bf80 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -524,7 +524,7 @@ struct target_ops char *(*to_pid_to_str) (struct target_ops *, ptid_t); char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *); char *(*to_thread_name) (struct target_ops *, struct thread_info *); - void (*to_stop) (ptid_t); + void (*to_stop) (struct target_ops *, ptid_t); void (*to_rcmd) (char *command, struct ui_file *output); char *(*to_pid_to_exec_file) (int pid); void (*to_log_command) (const char *); diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 9c1fdb0..7514eb5 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -165,7 +165,7 @@ static int windows_initialization_done; #define DEBUG_MEM(x) if (debug_memory) printf_unfiltered x #define DEBUG_EXCEPT(x) if (debug_exceptions) printf_unfiltered x -static void windows_stop (ptid_t); +static void windows_stop (struct target_ops *self, ptid_t); static int windows_thread_alive (struct target_ops *, ptid_t); static void windows_kill_inferior (struct target_ops *); @@ -2403,7 +2403,7 @@ windows_mourn_inferior (struct target_ops *ops) ^C on the controlling terminal. */ static void -windows_stop (ptid_t ptid) +windows_stop (struct target_ops *self, ptid_t ptid) { DEBUG_EVENTS (("gdb: GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)\n")); CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT, current_event.dwProcessId)); |