This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC v2 09/38] Add target_ops argument to to_insert_vfork_catchpoint
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Thu, 6 Feb 2014 13:55:07 -0700
- Subject: [RFC v2 09/38] Add target_ops argument to to_insert_vfork_catchpoint
- Authentication-results: sourceware.org; auth=none
- References: <1391720136-2121-1-git-send-email-tromey at redhat dot com>
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insert_vfork_catchpoint>: Add
argument.
(target_insert_vfork_catchpoint): Add argument.
* target.c (debug_to_insert_vfork_catchpoint): Add argument.
(update_current_target): Update.
* linux-nat.c (linux_child_insert_vfork_catchpoint): Add 'self'
argument.
Add target_ops argument to to_remove_vfork_catchpoint
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_remove_vfork_catchpoint>: Add
argument.
(target_remove_vfork_catchpoint): Add argument.
* target.c (debug_to_remove_vfork_catchpoint): Add argument.
(update_current_target): Update.
* linux-nat.c (linux_child_remove_vfork_catchpoint): Add 'self'
argument.
Add target_ops argument to to_insert_exec_catchpoint
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insert_exec_catchpoint>: Add
argument.
(target_insert_exec_catchpoint): Add argument.
* target.c (debug_to_insert_exec_catchpoint): Add argument.
(update_current_target): Update.
* linux-nat.c (linux_child_insert_exec_catchpoint): Add 'self'
argument.
Add target_ops argument to to_remove_exec_catchpoint
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_remove_exec_catchpoint>: Add
argument.
(target_remove_exec_catchpoint): Add argument.
* target.c (debug_to_remove_exec_catchpoint): Add argument.
(update_current_target): Update.
* linux-nat.c (linux_child_remove_exec_catchpoint): Add 'self'
argument.
Add target_ops argument to to_set_syscall_catchpoint
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_set_syscall_catchpoint>: Add
argument.
(target_set_syscall_catchpoint): Add argument.
* linux-nat.c (linux_child_set_syscall_catchpoint): Add 'self'
argument.
* target.c (update_current_target): Update.
Add target_ops argument to to_has_exited
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_has_exited>: Add argument.
(target_has_exited): Add argument.
* target.c (debug_to_has_exited): Add argument.
(update_current_target): Update.
Add target_ops argument to to_can_run
2014-02-06 Tom Tromey <tromey@redhat.com>
* windows-nat.c (windows_can_run): Add 'self' argument.
* target.h (struct target_ops) <to_can_run>: Add argument.
(target_can_run): Add argument.
* target.c (debug_to_can_run): Add argument.
(update_current_target): Update.
* nto-procfs.c (procfs_can_run): Add 'self' argument.
* inf-child.c (inf_child_can_run): Add 'self' argument.
* go32-nat.c (go32_can_run): Add 'self' argument.
Add target_ops argument to to_pass_signals
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_pass_signals>: Add argument.
* target.c (target_pass_signals): Add argument.
* remote.c (remote_pass_signals): Add 'self' argument.
(remote_start_remote): Update.
* procfs.c (procfs_pass_signals): Add 'self' argument.
* nto-procfs.c (procfs_pass_signals): Add 'self' argument.
* linux-nat.c (linux_nat_pass_signals): Add 'self' argument.
(linux_nat_create_inferior, linux_nat_attach): Update.
Add target_ops argument to to_program_signals
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_program_signals>: Add argument.
* target.c (target_program_signals): Add argument.
* remote.c (remote_program_signals): Add 'self' argument.
Add target_ops argument to to_extra_thread_info
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_extra_thread_info>: Add
argument.
(target_extra_thread_info): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_threads_extra_info): Add 'self' argument.
* ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
argument.
* nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
* nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
* linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
argument.
* bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
argument.
* aix-thread.c (aix_thread_extra_thread_info): Add 'self'
argument.
---
gdb/ChangeLog | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
gdb/aix-thread.c | 3 +-
gdb/bsd-uthread.c | 3 +-
gdb/go32-nat.c | 2 +-
gdb/inf-child.c | 2 +-
gdb/inf-ttrace.c | 3 +-
gdb/linux-nat.c | 18 +++++----
gdb/linux-thread-db.c | 3 +-
gdb/nto-procfs.c | 7 ++--
gdb/nto-tdep.c | 2 +-
gdb/nto-tdep.h | 2 +-
gdb/procfs.c | 6 ++-
gdb/ravenscar-thread.c | 5 ++-
gdb/remote.c | 10 +++--
gdb/target.c | 47 +++++++++++-----------
gdb/target.h | 39 ++++++++++---------
gdb/windows-nat.c | 2 +-
17 files changed, 190 insertions(+), 68 deletions(-)
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 7218abe..3597d3c 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1750,7 +1750,8 @@ aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
THREAD, for use in "info threads" output. */
static char *
-aix_thread_extra_thread_info (struct thread_info *thread)
+aix_thread_extra_thread_info (struct target_ops *self,
+ struct thread_info *thread)
{
struct ui_file *buf;
int status;
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 39218ba..1703444 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -482,7 +482,8 @@ static char *bsd_uthread_state[] =
INFO. */
static char *
-bsd_uthread_extra_thread_info (struct thread_info *info)
+bsd_uthread_extra_thread_info (struct target_ops *self,
+ struct thread_info *info)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
CORE_ADDR addr = ptid_get_tid (info->ptid);
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 75f6a3e..2e91b12 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -737,7 +737,7 @@ go32_mourn_inferior (struct target_ops *ops)
}
static int
-go32_can_run (void)
+go32_can_run (struct target_ops *self)
{
return 1;
}
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 7726470..37fac4b 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -128,7 +128,7 @@ inf_child_follow_fork (struct target_ops *ops, int follow_child,
}
static int
-inf_child_can_run (void)
+inf_child_can_run (struct target_ops *self)
{
return 1;
}
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index e9da0e7..c7b2856 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -1272,7 +1272,8 @@ inf_ttrace_thread_alive (struct target_ops *ops, ptid_t ptid)
INFO. */
static char *
-inf_ttrace_extra_thread_info (struct thread_info *info)
+inf_ttrace_extra_thread_info (struct target_ops *self,
+ struct thread_info *info)
{
struct inf_ttrace_private_thread_info* private =
(struct inf_ttrace_private_thread_info *) info->private;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 45d4053..76877de 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -708,31 +708,32 @@ linux_child_remove_fork_catchpoint (struct target_ops *self, int pid)
}
static int
-linux_child_insert_vfork_catchpoint (int pid)
+linux_child_insert_vfork_catchpoint (struct target_ops *self, int pid)
{
return !linux_supports_tracefork ();
}
static int
-linux_child_remove_vfork_catchpoint (int pid)
+linux_child_remove_vfork_catchpoint (struct target_ops *self, int pid)
{
return 0;
}
static int
-linux_child_insert_exec_catchpoint (int pid)
+linux_child_insert_exec_catchpoint (struct target_ops *self, int pid)
{
return !linux_supports_tracefork ();
}
static int
-linux_child_remove_exec_catchpoint (int pid)
+linux_child_remove_exec_catchpoint (struct target_ops *self, int pid)
{
return 0;
}
static int
-linux_child_set_syscall_catchpoint (int pid, int needed, int any_count,
+linux_child_set_syscall_catchpoint (struct target_ops *self,
+ int pid, int needed, int any_count,
int table_size, int *table)
{
if (!linux_supports_tracesysgood ())
@@ -823,7 +824,8 @@ static sigset_t pass_mask;
/* Update signals to pass to the inferior. */
static void
-linux_nat_pass_signals (int numsigs, unsigned char *pass_signals)
+linux_nat_pass_signals (struct target_ops *self,
+ int numsigs, unsigned char *pass_signals)
{
int signo;
@@ -1301,7 +1303,7 @@ linux_nat_create_inferior (struct target_ops *ops,
#endif /* HAVE_PERSONALITY */
/* Make sure we report all signals during startup. */
- linux_nat_pass_signals (0, NULL);
+ linux_nat_pass_signals (ops, 0, NULL);
linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
@@ -1326,7 +1328,7 @@ linux_nat_attach (struct target_ops *ops, char *args, int from_tty)
volatile struct gdb_exception ex;
/* Make sure we report all signals during attach. */
- linux_nat_pass_signals (0, NULL);
+ linux_nat_pass_signals (ops, 0, NULL);
TRY_CATCH (ex, RETURN_MASK_ERROR)
{
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index c05ebdf..9180464 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1772,7 +1772,8 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
INFO. */
static char *
-thread_db_extra_thread_info (struct thread_info *info)
+thread_db_extra_thread_info (struct target_ops *self,
+ struct thread_info *info)
{
if (info->private == NULL)
return NULL;
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 0a7ed55..5fedb90 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -57,7 +57,7 @@ static procfs_run run;
static void procfs_open (char *, int);
-static int procfs_can_run (void);
+static int procfs_can_run (struct target_ops *self);
static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
struct mem_attrib *attrib,
@@ -609,7 +609,7 @@ procfs_files_info (struct target_ops *ignore)
/* Mark our target-struct as eligible for stray "run" and "attach"
commands. */
static int
-procfs_can_run (void)
+procfs_can_run (struct target_ops *self)
{
return 1;
}
@@ -1336,7 +1336,8 @@ procfs_store_registers (struct target_ops *ops,
/* Set list of signals to be handled in the target. */
static void
-procfs_pass_signals (int numsigs, unsigned char *pass_signals)
+procfs_pass_signals (struct target_ops *self,
+ int numsigs, unsigned char *pass_signals)
{
int signo;
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index cc61423..a160a9e 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -362,7 +362,7 @@ static const char *nto_thread_state_str[] =
};
char *
-nto_extra_thread_info (struct thread_info *ti)
+nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
{
if (ti && ti->private
&& ti->private->state < ARRAY_SIZE (nto_thread_state_str))
diff --git a/gdb/nto-tdep.h b/gdb/nto-tdep.h
index 03fd89d..aa965c5 100644
--- a/gdb/nto-tdep.h
+++ b/gdb/nto-tdep.h
@@ -166,6 +166,6 @@ void nto_dummy_supply_regset (struct regcache *regcache, char *regs);
int nto_in_dynsym_resolve_code (CORE_ADDR pc);
-char *nto_extra_thread_info (struct thread_info *);
+char *nto_extra_thread_info (struct target_ops *self, struct thread_info *);
#endif
diff --git a/gdb/procfs.c b/gdb/procfs.c
index bd1ce41..1b01317 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -119,7 +119,8 @@ static void procfs_fetch_registers (struct target_ops *,
struct regcache *, int);
static void procfs_store_registers (struct target_ops *,
struct regcache *, int);
-static void procfs_pass_signals (int, unsigned char *);
+static void procfs_pass_signals (struct target_ops *self,
+ int, unsigned char *);
static void procfs_kill_inferior (struct target_ops *ops);
static void procfs_mourn_inferior (struct target_ops *ops);
static void procfs_create_inferior (struct target_ops *, char *,
@@ -4225,7 +4226,8 @@ procfs_resume (struct target_ops *ops,
/* Set up to trace signals in the child process. */
static void
-procfs_pass_signals (int numsigs, unsigned char *pass_signals)
+procfs_pass_signals (struct target_ops *self,
+ int numsigs, unsigned char *pass_signals)
{
gdb_sigset_t signals;
procinfo *pi = find_procinfo_or_die (ptid_get_pid (inferior_ptid), 0);
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index fc87d79..12d0247 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -56,7 +56,8 @@ static struct observer *update_target_observer = NULL;
static void ravenscar_find_new_threads (struct target_ops *ops);
static ptid_t ravenscar_running_thread (void);
-static char *ravenscar_extra_thread_info (struct thread_info *tp);
+static char *ravenscar_extra_thread_info (struct target_ops *self,
+ struct thread_info *tp);
static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid);
static void ravenscar_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum);
@@ -242,7 +243,7 @@ ravenscar_running_thread (void)
}
static char *
-ravenscar_extra_thread_info (struct thread_info *tp)
+ravenscar_extra_thread_info (struct target_ops *self, struct thread_info *tp)
{
return "Ravenscar task";
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 8179c9a..9d3c6ab 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1700,7 +1700,8 @@ record_currthread (struct remote_state *rs, ptid_t currthread)
it can simply pass through to the inferior without reporting. */
static void
-remote_pass_signals (int numsigs, unsigned char *pass_signals)
+remote_pass_signals (struct target_ops *self,
+ int numsigs, unsigned char *pass_signals)
{
if (remote_protocol_packets[PACKET_QPassSignals].support != PACKET_DISABLE)
{
@@ -1750,7 +1751,8 @@ remote_pass_signals (int numsigs, unsigned char *pass_signals)
signals it should pass through to the inferior when detaching. */
static void
-remote_program_signals (int numsigs, unsigned char *signals)
+remote_program_signals (struct target_ops *self,
+ int numsigs, unsigned char *signals)
{
if (remote_protocol_packets[PACKET_QProgramSignals].support != PACKET_DISABLE)
{
@@ -2874,7 +2876,7 @@ remote_threads_info (struct target_ops *ops)
*/
static char *
-remote_threads_extra_info (struct thread_info *tp)
+remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
{
struct remote_state *rs = get_remote_state ();
int result;
@@ -3660,7 +3662,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
gdb_assert (wait_status == NULL);
/* Report all signals during attach/startup. */
- remote_pass_signals (0, NULL);
+ remote_pass_signals (target, 0, NULL);
}
/* If we connected to a live target, do some additional setup. */
diff --git a/gdb/target.c b/gdb/target.c
index 02e4c6b..d948e92 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -144,7 +144,7 @@ static void debug_to_terminal_ours (struct target_ops *self);
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);
@@ -798,27 +798,28 @@ update_current_target (void)
(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 *))
@@ -2759,7 +2760,7 @@ target_pass_signals (int numsigs, unsigned char *pass_signals)
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_pass_signals) (numsigs, pass_signals);
+ (*t->to_pass_signals) (t, numsigs, pass_signals);
return;
}
}
@@ -2789,7 +2790,7 @@ target_program_signals (int numsigs, unsigned char *program_signals)
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_program_signals) (numsigs, program_signals);
+ (*t->to_program_signals) (t, numsigs, program_signals);
return;
}
}
@@ -4831,11 +4832,11 @@ debug_to_remove_fork_catchpoint (struct target_ops *self, int pid)
}
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);
@@ -4844,11 +4845,11 @@ debug_to_insert_vfork_catchpoint (int pid)
}
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);
@@ -4857,11 +4858,11 @@ debug_to_remove_vfork_catchpoint (int pid)
}
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);
@@ -4870,11 +4871,11 @@ debug_to_insert_exec_catchpoint (int pid)
}
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);
@@ -4883,11 +4884,13 @@ debug_to_remove_exec_catchpoint (int pid)
}
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);
@@ -4896,11 +4899,11 @@ debug_to_has_exited (int pid, int wait_status, int *exit_status)
}
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);
diff --git a/gdb/target.h b/gdb/target.h
index 2eface1..dc560a1 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -491,28 +491,29 @@ struct target_ops
void (*to_post_startup_inferior) (struct target_ops *, ptid_t);
int (*to_insert_fork_catchpoint) (struct target_ops *, int);
int (*to_remove_fork_catchpoint) (struct target_ops *, int);
- int (*to_insert_vfork_catchpoint) (int);
- int (*to_remove_vfork_catchpoint) (int);
+ int (*to_insert_vfork_catchpoint) (struct target_ops *, int);
+ int (*to_remove_vfork_catchpoint) (struct target_ops *, int);
int (*to_follow_fork) (struct target_ops *, int, int);
- int (*to_insert_exec_catchpoint) (int);
- int (*to_remove_exec_catchpoint) (int);
- int (*to_set_syscall_catchpoint) (int, int, int, int, int *);
- int (*to_has_exited) (int, int, int *);
+ int (*to_insert_exec_catchpoint) (struct target_ops *, int);
+ int (*to_remove_exec_catchpoint) (struct target_ops *, int);
+ int (*to_set_syscall_catchpoint) (struct target_ops *,
+ int, int, int, int, int *);
+ int (*to_has_exited) (struct target_ops *, int, int, int *);
void (*to_mourn_inferior) (struct target_ops *);
- int (*to_can_run) (void);
+ int (*to_can_run) (struct target_ops *);
/* Documentation of this routine is provided with the corresponding
target_* macro. */
- void (*to_pass_signals) (int, unsigned char *);
+ void (*to_pass_signals) (struct target_ops *, int, unsigned char *);
/* Documentation of this routine is provided with the
corresponding target_* function. */
- void (*to_program_signals) (int, unsigned char *);
+ void (*to_program_signals) (struct target_ops *, int, unsigned char *);
int (*to_thread_alive) (struct target_ops *, ptid_t ptid);
void (*to_find_new_threads) (struct target_ops *);
char *(*to_pid_to_str) (struct target_ops *, ptid_t);
- char *(*to_extra_thread_info) (struct thread_info *);
+ char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *);
char *(*to_thread_name) (struct thread_info *);
void (*to_stop) (ptid_t);
void (*to_rcmd) (char *command, struct ui_file *output);
@@ -1299,10 +1300,10 @@ void target_create_inferior (char *exec_file, char *args,
(*current_target.to_remove_fork_catchpoint) (¤t_target, pid)
#define target_insert_vfork_catchpoint(pid) \
- (*current_target.to_insert_vfork_catchpoint) (pid)
+ (*current_target.to_insert_vfork_catchpoint) (¤t_target, pid)
#define target_remove_vfork_catchpoint(pid) \
- (*current_target.to_remove_vfork_catchpoint) (pid)
+ (*current_target.to_remove_vfork_catchpoint) (¤t_target, pid)
/* If the inferior forks or vforks, this function will be called at
the next resume in order to perform any bookkeeping and fiddling
@@ -1320,10 +1321,10 @@ int target_follow_fork (int follow_child, int detach_fork);
catchpoint type is not supported and -1 for failure. */
#define target_insert_exec_catchpoint(pid) \
- (*current_target.to_insert_exec_catchpoint) (pid)
+ (*current_target.to_insert_exec_catchpoint) (¤t_target, pid)
#define target_remove_exec_catchpoint(pid) \
- (*current_target.to_remove_exec_catchpoint) (pid)
+ (*current_target.to_remove_exec_catchpoint) (¤t_target, pid)
/* Syscall catch.
@@ -1346,14 +1347,16 @@ int target_follow_fork (int follow_child, int detach_fork);
for failure. */
#define target_set_syscall_catchpoint(pid, needed, any_count, table_size, table) \
- (*current_target.to_set_syscall_catchpoint) (pid, needed, any_count, \
+ (*current_target.to_set_syscall_catchpoint) (¤t_target, \
+ pid, needed, any_count, \
table_size, table)
/* Returns TRUE if PID has exited. And, also sets EXIT_STATUS to the
exit code of PID, if any. */
#define target_has_exited(pid,wait_status,exit_status) \
- (*current_target.to_has_exited) (pid,wait_status,exit_status)
+ (*current_target.to_has_exited) (¤t_target, \
+ pid,wait_status,exit_status)
/* The debugger has completed a blocking wait() call. There is now
some process event that must be processed. This function should
@@ -1367,7 +1370,7 @@ void target_mourn_inferior (void);
/* Does target have enough data to do a run or attach command? */
#define target_can_run(t) \
- ((t)->to_can_run) ()
+ ((t)->to_can_run) (t)
/* Set list of signals to be handled in the target.
@@ -1508,7 +1511,7 @@ extern char *normal_pid_to_str (ptid_t ptid);
is okay. */
#define target_extra_thread_info(TP) \
- (current_target.to_extra_thread_info (TP))
+ (current_target.to_extra_thread_info (¤t_target, TP))
/* Return the thread's name. A NULL result means that the target
could not determine this thread's name. */
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index b0ed3f6..ef844be 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2474,7 +2474,7 @@ windows_prepare_to_store (struct target_ops *self, struct regcache *regcache)
}
static int
-windows_can_run (void)
+windows_can_run (struct target_ops *self)
{
return 1;
}
--
1.8.1.4