struct siginfo vs. siginfo_t
authorThomas Schwinge <tschwinge@gnu.org>
Wed, 21 Mar 2012 13:43:55 +0000 (13:43 +0000)
committerThomas Schwinge <tschwinge@gnu.org>
Wed, 21 Mar 2012 13:43:55 +0000 (13:43 +0000)
gdb/
* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
of struct siginfo.
* arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
* linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
(linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
(linux_nat_get_siginfo): Likewise.
* linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
(linux_nat_get_siginfo): Likewise.
* linux-tdep.c (linux_get_siginfo_type): Likewise.
* ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
* procfs.c (gdb_siginfo_t): Likewise.

gdbserver/
* linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
struct siginfo.
* linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
* linux-x86-low.c (x86_siginfo_fixup): Likewise.
* linux-low.h: Include <signal.h>.
(struct siginfo): Remove forward declaration.
(struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
struct siginfo.

13 files changed:
gdb/ChangeLog
gdb/amd64-linux-nat.c
gdb/arm-linux-nat.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-x86-low.c
gdb/ia64-linux-nat.c
gdb/linux-nat.c
gdb/linux-nat.h
gdb/ppc-linux-nat.c
gdb/procfs.c

index b84439819d992a2ad78387c2c5a3cec50387eb79..53440677db1f8b933f86530d37a0ff7a6edc06cd 100644 (file)
@@ -1,3 +1,18 @@
+2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
+       of struct siginfo.
+       * arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
+       * ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
+       * linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
+       (linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
+       (linux_nat_get_siginfo): Likewise.
+       * linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
+       (linux_nat_get_siginfo): Likewise.
+       * linux-tdep.c (linux_get_siginfo_type): Likewise.
+       * ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
+       * procfs.c (gdb_siginfo_t): Likewise.
+
 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
 
        * .gitignore: Ignore more files.
index f954483dac0ea924d43b04cad56126603345d9e3..5ebba3a7472633c91b5438480f3a069d496daab6 100644 (file)
@@ -731,13 +731,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
    INF.  */
 
 static int
-amd64_linux_siginfo_fixup (struct siginfo *native, gdb_byte *inf, int direction)
+amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
 {
   /* Is the inferior 32-bit?  If so, then do fixup the siginfo
      object.  */
   if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32)
     {
-      gdb_assert (sizeof (struct siginfo) == sizeof (compat_siginfo_t));
+      gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t));
 
       if (direction == 0)
        compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native);
index c5ce21ca0bee8d11f01e3db7002f688fec48f5fb..f9f6ba5ea1cc1632a88b1bd3e65fbad61e4b6429 100644 (file)
@@ -1137,7 +1137,7 @@ arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
 static int
 arm_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
 {
-  struct siginfo *siginfo_p = linux_nat_get_siginfo (inferior_ptid);
+  siginfo_t *siginfo_p = linux_nat_get_siginfo (inferior_ptid);
   int slot = siginfo_p->si_errno;
 
   /* This must be a hardware breakpoint.  */
index 238679e7258cdbafee5d1ed6243671e923520559..155dbb18e99eab8339877a3e73b8261883708ab7 100644 (file)
@@ -1,3 +1,14 @@
+2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
+       struct siginfo.
+       * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
+       * linux-x86-low.c (x86_siginfo_fixup): Likewise.
+       * linux-low.h: Include <signal.h>.
+       (struct siginfo): Remove forward declaration.
+       (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
+       struct siginfo.
+
 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
 
        * .gitignore: Ignore more files.
index ff2437d5bf854a1615b8f933ddda7c037b1c9a24..01208efc1ab9d0b1eec4c5b20de3c73c31473e10 100644 (file)
@@ -631,7 +631,7 @@ static int
 arm_stopped_by_watchpoint (void)
 {
   struct lwp_info *lwp = get_thread_lwp (current_inferior);
-  struct siginfo siginfo;
+  siginfo_t siginfo;
 
   /* We must be able to set hardware watchpoints.  */
   if (arm_linux_get_hw_watchpoint_count () == 0)
index d2d4c1d3349bf94471362b943891a346886669c1..4734f159067b56b3fd613b64770df573db02cb01 100644 (file)
@@ -4779,7 +4779,7 @@ linux_qxfer_osdata (const char *annex,
    layout of the inferiors' architecture.  */
 
 static void
-siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction)
+siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction)
 {
   int done = 0;
 
@@ -4791,9 +4791,9 @@ siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction)
   if (!done)
     {
       if (direction == 1)
-       memcpy (siginfo, inf_siginfo, sizeof (struct siginfo));
+       memcpy (siginfo, inf_siginfo, sizeof (siginfo_t));
       else
-       memcpy (inf_siginfo, siginfo, sizeof (struct siginfo));
+       memcpy (inf_siginfo, siginfo, sizeof (siginfo_t));
     }
 }
 
@@ -4802,8 +4802,8 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf,
                    unsigned const char *writebuf, CORE_ADDR offset, int len)
 {
   int pid;
-  struct siginfo siginfo;
-  char inf_siginfo[sizeof (struct siginfo)];
+  siginfo_t siginfo;
+  char inf_siginfo[sizeof (siginfo_t)];
 
   if (current_inferior == NULL)
     return -1;
index 677d2617df4b295d3d6ea79f68944ccce594b4c1..3aeae704055e3d16fd70806d60ab857f362f55d8 100644 (file)
@@ -20,6 +20,7 @@
 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
 #endif
+#include <signal.h>
 
 #include "gdb_proc_service.h"
 
@@ -46,8 +47,6 @@ struct regset_info
 extern struct regset_info target_regsets[];
 #endif
 
-struct siginfo;
-
 struct process_info_private
 {
   /* Arch-specific additions.  */
@@ -109,7 +108,7 @@ struct linux_target_ops
      Returns true if any conversion was done; false otherwise.
      If DIRECTION is 1, then copy from INF to NATIVE.
      If DIRECTION is 0, copy from NATIVE to INF.  */
-  int (*siginfo_fixup) (struct siginfo *native, void *inf, int direction);
+  int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction);
 
   /* Hook to call when a new process is created or attached to.
      If extra per-process architecture-specific data is needed,
index ed1f8a8bcf52ef9630df6f4c08bade2c533fb21b..b466b5d281ec2b2b4b07c9c3db9ade799b2d5b47 100644 (file)
@@ -918,13 +918,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
    INF.  */
 
 static int
-x86_siginfo_fixup (struct siginfo *native, void *inf, int direction)
+x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
 {
 #ifdef __x86_64__
   /* Is the inferior 32-bit?  If so, then fixup the siginfo object.  */
   if (register_size (0) == 4)
     {
-      if (sizeof (struct siginfo) != sizeof (compat_siginfo_t))
+      if (sizeof (siginfo_t) != sizeof (compat_siginfo_t))
        fatal ("unexpected difference in siginfo");
 
       if (direction == 0)
index 8773195e0fbc5e820a501a7ba54013e5f69add8b..19b827f84a66c656a526f0589b4d470542e03816 100644 (file)
@@ -637,7 +637,7 @@ static int
 ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
 {
   CORE_ADDR psr;
-  struct siginfo *siginfo_p;
+  siginfo_t *siginfo_p;
   struct regcache *regcache = get_current_regcache ();
 
   siginfo_p = linux_nat_get_siginfo (inferior_ptid);
index f80c0c10b627f247cebe6385bd07544e624ccd53..d81d55e64984c2a61cae9436d7b663b9cd2609e4 100644 (file)
@@ -188,7 +188,7 @@ static void (*linux_nat_prepare_to_resume) (struct lwp_info *);
 /* The method to call, if any, when the siginfo object needs to be
    converted between the layout returned by ptrace, and the layout in
    the architecture of the inferior.  */
-static int (*linux_nat_siginfo_fixup) (struct siginfo *,
+static int (*linux_nat_siginfo_fixup) (siginfo_t *,
                                       gdb_byte *,
                                       int);
 
@@ -4232,7 +4232,7 @@ linux_nat_mourn_inferior (struct target_ops *ops)
    layout of the inferiors' architecture.  */
 
 static void
-siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction)
+siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
 {
   int done = 0;
 
@@ -4244,9 +4244,9 @@ siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction)
   if (!done)
     {
       if (direction == 1)
-       memcpy (siginfo, inf_siginfo, sizeof (struct siginfo));
+       memcpy (siginfo, inf_siginfo, sizeof (siginfo_t));
       else
-       memcpy (inf_siginfo, siginfo, sizeof (struct siginfo));
+       memcpy (inf_siginfo, siginfo, sizeof (siginfo_t));
     }
 }
 
@@ -4256,8 +4256,8 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object,
                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 {
   int pid;
-  struct siginfo siginfo;
-  gdb_byte inf_siginfo[sizeof (struct siginfo)];
+  siginfo_t siginfo;
+  gdb_byte inf_siginfo[sizeof (siginfo_t)];
 
   gdb_assert (object == TARGET_OBJECT_SIGNAL_INFO);
   gdb_assert (readbuf || writebuf);
@@ -5266,7 +5266,7 @@ linux_nat_set_new_thread (struct target_ops *t,
    inferior.  */
 void
 linux_nat_set_siginfo_fixup (struct target_ops *t,
-                            int (*siginfo_fixup) (struct siginfo *,
+                            int (*siginfo_fixup) (siginfo_t *,
                                                   gdb_byte *,
                                                   int))
 {
@@ -5285,7 +5285,7 @@ linux_nat_set_prepare_to_resume (struct target_ops *t,
 }
 
 /* Return the saved siginfo associated with PTID.  */
-struct siginfo *
+siginfo_t *
 linux_nat_get_siginfo (ptid_t ptid)
 {
   struct lwp_info *lp = find_lwp_pid (ptid);
index c9878d97c1564e6fa2902e9ebf05138ae31fdce9..d87f0cfca80ca1a8636c7a80b568e56a796a4d68 100644 (file)
@@ -78,7 +78,7 @@ struct lwp_info
 
   /* Non-zero si_signo if this LWP stopped with a trap.  si_addr may
      be the address of a hardware watchpoint.  */
-  struct siginfo siginfo;
+  siginfo_t siginfo;
 
   /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
      watchpoint trap.  */
@@ -184,7 +184,7 @@ void linux_nat_set_new_thread (struct target_ops *, void (*) (struct lwp_info *)
    that ptrace returns, and the layout in the architecture of the
    inferior.  */
 void linux_nat_set_siginfo_fixup (struct target_ops *,
-                                 int (*) (struct siginfo *,
+                                 int (*) (siginfo_t *,
                                           gdb_byte *,
                                           int));
 
@@ -198,7 +198,7 @@ void linux_nat_set_prepare_to_resume (struct target_ops *,
 void linux_nat_switch_fork (ptid_t new_ptid);
 
 /* Return the saved siginfo associated with PTID.  */
-struct siginfo *linux_nat_get_siginfo (ptid_t ptid);
+siginfo_t *linux_nat_get_siginfo (ptid_t ptid);
 
 /* Set alternative SIGTRAP-like events recognizer.  */
 void linux_nat_set_status_is_event (struct target_ops *t,
index 1bd157be96c145df2fed72d42a44d261eae3961a..9bd11fd8bbbe2ce3c4323b014280ca0c060bb78d 100644 (file)
@@ -2218,7 +2218,7 @@ ppc_linux_thread_exit (struct thread_info *tp, int silent)
 static int
 ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
 {
-  struct siginfo *siginfo_p;
+  siginfo_t *siginfo_p;
 
   siginfo_p = linux_nat_get_siginfo (inferior_ptid);
 
index 903621d6dfe1a0290f0fc46ee9f89dc52629c350..cb4bc7c626cd5bc7bac74b740f19ceeddf924ca4 100644 (file)
@@ -266,7 +266,7 @@ typedef struct sigaction gdb_sigaction_t;
 #ifdef HAVE_PR_SIGINFO64_T
 typedef pr_siginfo64_t gdb_siginfo_t;
 #else
-typedef struct siginfo gdb_siginfo_t;
+typedef siginfo_t gdb_siginfo_t;
 #endif
 
 /* On mips-irix, praddset and prdelset are defined in such a way that
This page took 0.045067 seconds and 4 git commands to generate.