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.
This commit is contained in:
parent
503a628d9b
commit
1eab8a48bf
14 changed files with 46 additions and 26 deletions
|
@ -1,3 +1,23 @@
|
|||
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.
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
10
gdb/target.c
10
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));
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue