aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-06 16:49:43 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-06 16:49:43 +0000
commitf865ee35b75718f7b0a1c75f7cf9167bb40c6f0c (patch)
tree70f71c836e49f8a7e359a63251fca352b335a54b /gdb/ppc-linux-nat.c
parent76b83c514f6b202659c8b600b20fe0e107f83f6f (diff)
downloadgdb-f865ee35b75718f7b0a1c75f7cf9167bb40c6f0c.zip
gdb-f865ee35b75718f7b0a1c75f7cf9167bb40c6f0c.tar.gz
gdb-f865ee35b75718f7b0a1c75f7cf9167bb40c6f0c.tar.bz2
gdb/
Code cleanup for the next patch. * arm-linux-nat.c (arm_linux_stopped_data_address): Change variable siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo call for it. * ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise. (ia64_linux_stopped_data_address): * linux-nat.c (linux_nat_get_siginfo): Add parameter siginfo, change the return value. * linux-nat.h (linux_nat_get_siginfo): Likewise. * ppc-linux-nat.c (ppc_linux_stopped_data_address): Change variable siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo call for it.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 45cdd73..14f4ecb 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -2221,12 +2221,13 @@ 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)
{
- siginfo_t *siginfo_p;
+ siginfo_t siginfo;
- siginfo_p = linux_nat_get_siginfo (inferior_ptid);
+ if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
+ return 0;
- if (siginfo_p->si_signo != SIGTRAP
- || (siginfo_p->si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
+ if (siginfo.si_signo != SIGTRAP
+ || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
return 0;
if (have_ptrace_booke_interface ())
@@ -2235,7 +2236,7 @@ ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
struct thread_points *t;
struct hw_break_tuple *hw_breaks;
/* The index (or slot) of the *point is passed in the si_errno field. */
- int slot = siginfo_p->si_errno;
+ int slot = siginfo.si_errno;
t = booke_find_thread_points_by_tid (TIDGET (inferior_ptid), 0);
@@ -2252,7 +2253,7 @@ ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
}
}
- *addr_p = (CORE_ADDR) (uintptr_t) siginfo_p->si_addr;
+ *addr_p = (CORE_ADDR) (uintptr_t) siginfo.si_addr;
return 1;
}