+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.
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);
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. */
+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.
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)
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;
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));
}
}
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;
#ifdef HAVE_THREAD_DB_H
#include <thread_db.h>
#endif
+#include <signal.h>
#include "gdb_proc_service.h"
extern struct regset_info target_regsets[];
#endif
-struct siginfo;
-
struct process_info_private
{
/* Arch-specific additions. */
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,
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)
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);
/* 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);
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;
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));
}
}
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);
inferior. */
void
linux_nat_set_siginfo_fixup (struct target_ops *t,
- int (*siginfo_fixup) (struct siginfo *,
+ int (*siginfo_fixup) (siginfo_t *,
gdb_byte *,
int))
{
}
/* 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);
/* 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. */
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));
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,
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);
#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