+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.
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);
}
static void
-darwin_stop (ptid_t t)
+darwin_stop (struct target_ops *self, ptid_t t)
{
struct inferior *inf = current_inferior ();
}
static void
-gnu_stop (ptid_t ptid)
+gnu_stop (struct target_ops *self, ptid_t ptid)
{
error (_("to_stop target function not implemented"));
}
/* 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
}
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
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
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");
}
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)
}
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);
}
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);
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);
}
}
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");
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);
}
static void
-gdbsim_stop (ptid_t ptid)
+gdbsim_stop (struct target_ops *self, ptid_t ptid)
{
struct sim_inferior_data *sim_data;
static void
gdbsim_cntrl_c (int signo)
{
- gdbsim_stop (minus_one_ptid);
+ gdbsim_stop (NULL, minus_one_ptid);
}
static ptid_t
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);
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");
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
(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 *))
return;
}
- (*current_target.to_stop) (ptid);
+ (*current_target.to_stop) (¤t_target, ptid);
}
static void
}
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));
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 *);
#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 *);
^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));