Add target_ops argument to to_pass_signals
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:33:44 +0000 (21:33 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:51 +0000 (07:45 -0700)
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.

gdb/ChangeLog
gdb/linux-nat.c
gdb/nto-procfs.c
gdb/procfs.c
gdb/remote.c
gdb/target.c
gdb/target.h

index 1cbdfe6f1bae68cc1d3653d8c5e35795c5b6e324..12442cdce00aec96e588b14c6cd495eb1596c37f 100644 (file)
@@ -1,3 +1,14 @@
+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.
index aaf55bfaa3eadcc1ab04c08c1dc0df95cda0fa91..42a95faad00fda24b3e8f66aa2b76d0211884dfb 100644 (file)
@@ -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)
     {
index e86511c46300916ab9cac882644d53110af60f33..5fedb9074edaaa7420c9f8e1ddc50d839068f7d1 100644 (file)
@@ -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;
 
index 511ddf1c812e7b3d7337c28f80e0a3056d1a9488..bbe29f2422d9efa90105c88eb893fe6290242993 100644 (file)
@@ -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);
index 0c9de6d4dc368028c730c09b4d2830aa6a9e6b0c..7b295ab94630a1c4d9797de1229ee891cb86afc0 100644 (file)
@@ -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.  */
index cfe9ee74a60c7ff6cb567b26f51862f65aaf2450..38bb16a994d01f8d810842c17efcf9ba58f11210 100644 (file)
@@ -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;
        }
     }
index 71546a12906661cfc827b972b3a3fddac8bcf254..e32309372952fb07cb94d3042a69344a5f083166 100644 (file)
@@ -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.  */
This page took 0.043875 seconds and 4 git commands to generate.