aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:33:44 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:51 -0700
commit94bedb42a7fe3265db2f84d9c7f2a73979953de0 (patch)
tree7c3768377e6d7a917fa71e42f734b6371f539f2c /gdb
parentda82bd6b65af8f3cec02621435331983b27d93a0 (diff)
downloadgdb-94bedb42a7fe3265db2f84d9c7f2a73979953de0.zip
gdb-94bedb42a7fe3265db2f84d9c7f2a73979953de0.tar.gz
gdb-94bedb42a7fe3265db2f84d9c7f2a73979953de0.tar.bz2
Add target_ops argument to to_pass_signals
2014-02-19 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/linux-nat.c7
-rw-r--r--gdb/nto-procfs.c3
-rw-r--r--gdb/procfs.c6
-rw-r--r--gdb/remote.c5
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h2
7 files changed, 26 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1cbdfe6..12442cd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
2014-02-19 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.
+
+2014-02-19 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.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index aaf55bf..42a95fa 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -824,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;
@@ -1302,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);
@@ -1327,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/nto-procfs.c b/gdb/nto-procfs.c
index e86511c..5fedb90 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -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/procfs.c b/gdb/procfs.c
index 511ddf1..bbe29f2 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 *,
@@ -4227,7 +4228,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/remote.c b/gdb/remote.c
index 0c9de6d..7b295ab 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1695,7 +1695,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)
{
@@ -3592,7 +3593,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 cfe9ee7..38bb16a 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2821,7 +2821,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;
}
}
diff --git a/gdb/target.h b/gdb/target.h
index 71546a1..e323093 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -513,7 +513,7 @@ 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. */