From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 646 invoked by alias); 13 Jan 2014 19:13:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 518 invoked by uid 89); 13 Jan 2014 19:13:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2014 19:13:02 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJD0iK001852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jan 2014 14:13:00 -0500 Received: from barimba.redhat.com (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJCptH016701; Mon, 13 Jan 2014 14:13:00 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 11/32] Add target_ops argument to to_insert_vfork_catchpoint Date: Mon, 13 Jan 2014 19:13:00 -0000 Message-Id: <1389640367-5571-12-git-send-email-tromey@redhat.com> In-Reply-To: <1389640367-5571-1-git-send-email-tromey@redhat.com> References: <1389640367-5571-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-01/txt/msg00340.txt.bz2 2014-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * windows-nat.c (windows_can_run): Add 'self' argument. * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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-01-08 Tom Tromey * target.h (struct target_ops) : 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 | 4 +- 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, 191 insertions(+), 69 deletions(-) diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index df21a99..1a24eb0 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 1da4172..e00e0c2 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 5daeb4d..c42f48a 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -257,7 +257,7 @@ static void go32_kill_inferior (struct target_ops *ops); static void go32_create_inferior (struct target_ops *ops, char *exec_file, char *args, char **env, int from_tty); static void go32_mourn_inferior (struct target_ops *ops); -static int go32_can_run (void); +static int go32_can_run (struct target_ops *self); static struct target_ops go32_ops; static void go32_terminal_init (struct target_ops *self); @@ -764,7 +764,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 cde56a2..858b464 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 4f94438..545af88 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 53c3923..aa3b136 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -714,31 +714,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 ()) @@ -829,7 +830,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; @@ -1307,7 +1309,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); @@ -1332,7 +1334,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 4cc3a4c..2e39aa8 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -1764,7 +1764,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 22e8f46..6fd3502 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; } @@ -1338,7 +1338,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 674d572..4365cae 100644 --- a/gdb/nto-tdep.c +++ b/gdb/nto-tdep.c @@ -364,7 +364,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 e9444a9..005d314 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 448ce04..4ce2ebb 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 *, @@ -4230,7 +4231,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 0d60277..d912691 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 547045b..61fc670 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1684,7 +1684,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) { @@ -1736,7 +1737,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) { @@ -2862,7 +2864,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; @@ -3611,7 +3613,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 9dcedfd..4345ff6 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -140,7 +140,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); @@ -794,27 +794,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_zero); de_fault (to_thread_name, (char *(*) (struct thread_info *)) @@ -2747,7 +2748,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; } } @@ -2777,7 +2778,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; } } @@ -4765,11 +4766,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); @@ -4778,11 +4779,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); @@ -4791,11 +4792,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); @@ -4804,11 +4805,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); @@ -4817,11 +4818,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); @@ -4830,11 +4833,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 15bcbd3..d2a1796 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -486,28 +486,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); @@ -1277,10 +1278,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 @@ -1298,10 +1299,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. @@ -1324,14 +1325,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 @@ -1345,7 +1348,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. @@ -1486,7 +1489,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 3942f6f..24ad228 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -2465,7 +2465,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