static void debug_to_load (struct target_ops *self, char *, int);
-static int debug_to_can_run (void);
+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
(void (*) (struct target_ops *, ptid_t))
target_ignore);
de_fault (to_insert_fork_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_remove_fork_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_insert_vfork_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_remove_vfork_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_insert_exec_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_remove_exec_catchpoint,
- (int (*) (int))
+ (int (*) (struct target_ops *, int))
return_one);
de_fault (to_set_syscall_catchpoint,
- (int (*) (int, int, int, int, int *))
+ (int (*) (struct target_ops *, int, int, int, int, int *))
return_one);
de_fault (to_has_exited,
- (int (*) (int, int, int *))
+ (int (*) (struct target_ops *, int, int, int *))
return_zero);
de_fault (to_can_run,
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_extra_thread_info,
- (char *(*) (struct thread_info *))
+ (char *(*) (struct target_ops *, struct thread_info *))
return_null);
de_fault (to_thread_name,
- (char *(*) (struct thread_info *))
+ (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 *))
+ (void (*) (struct target_ops *, char *, struct ui_file *))
tcomplain);
de_fault (to_pid_to_exec_file,
- (char *(*) (int))
+ (char *(*) (struct target_ops *, int))
return_null);
de_fault (to_thread_architecture,
default_thread_architecture);
for (t = current_target.beneath; t != NULL; t = t->beneath)
{
if (t->to_thread_name != NULL)
- return (*t->to_thread_name) (info);
+ return (*t->to_thread_name) (t, info);
}
return NULL;
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_pass_signals) (numsigs, pass_signals);
+ (*t->to_pass_signals) (t, numsigs, pass_signals);
return;
}
}
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_program_signals) (numsigs, program_signals);
+ (*t->to_program_signals) (t, numsigs, program_signals);
return;
}
}
}
static int
-find_default_supports_non_stop (void)
+find_default_supports_non_stop (struct target_ops *self)
{
struct target_ops *t;
t = find_default_run_target (NULL);
if (t && t->to_supports_non_stop)
- return (t->to_supports_non_stop) ();
+ return (t->to_supports_non_stop) (t);
return 0;
}
for (t = ¤t_target; t != NULL; t = t->beneath)
if (t->to_supports_non_stop)
- return t->to_supports_non_stop ();
+ return t->to_supports_non_stop (t);
return 0;
}
return;
}
- (*current_target.to_stop) (ptid);
+ (*current_target.to_stop) (¤t_target, ptid);
}
static void
}
static int
-debug_to_insert_fork_catchpoint (int pid)
+debug_to_insert_fork_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_insert_fork_catchpoint (pid);
+ retval = debug_target.to_insert_fork_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_remove_fork_catchpoint (int pid)
+debug_to_remove_fork_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_remove_fork_catchpoint (pid);
+ retval = debug_target.to_remove_fork_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_insert_vfork_catchpoint (int pid)
+debug_to_insert_vfork_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_insert_vfork_catchpoint (pid);
+ retval = debug_target.to_insert_vfork_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_remove_vfork_catchpoint (int pid)
+debug_to_remove_vfork_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_remove_vfork_catchpoint (pid);
+ retval = debug_target.to_remove_vfork_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_insert_exec_catchpoint (int pid)
+debug_to_insert_exec_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_insert_exec_catchpoint (pid);
+ retval = debug_target.to_insert_exec_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_remove_exec_catchpoint (int pid)
+debug_to_remove_exec_catchpoint (struct target_ops *self, int pid)
{
int retval;
- retval = debug_target.to_remove_exec_catchpoint (pid);
+ retval = debug_target.to_remove_exec_catchpoint (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n",
pid, retval);
}
static int
-debug_to_has_exited (int pid, int wait_status, int *exit_status)
+debug_to_has_exited (struct target_ops *self,
+ int pid, int wait_status, int *exit_status)
{
int has_exited;
- has_exited = debug_target.to_has_exited (pid, wait_status, exit_status);
+ has_exited = debug_target.to_has_exited (&debug_target,
+ pid, wait_status, exit_status);
fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
pid, wait_status, *exit_status, has_exited);
}
static int
-debug_to_can_run (void)
+debug_to_can_run (struct target_ops *self)
{
int retval;
- retval = debug_target.to_can_run ();
+ retval = debug_target.to_can_run (&debug_target);
fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval);
}
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));
}
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);
}
static char *
-debug_to_pid_to_exec_file (int pid)
+debug_to_pid_to_exec_file (struct target_ops *self, int pid)
{
char *exec_file;
- exec_file = debug_target.to_pid_to_exec_file (pid);
+ exec_file = debug_target.to_pid_to_exec_file (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n",
pid, exec_file);
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);
}