diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-07-06 16:49:42 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-07-06 16:49:42 +0000 |
commit | 52fc103f248ffc9d32b17b22974d565cd042acd9 (patch) | |
tree | f569c2e818ce333c9811b8950e263a855a7a9945 /gdb/ia64-linux-nat.c | |
parent | 7eb23e0811b14d0b8f5c08c87ab4b5d1ef913581 (diff) | |
download | gdb-52fc103f248ffc9d32b17b22974d565cd042acd9.tar.gz |
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/ia64-linux-nat.c')
-rw-r--r-- | gdb/ia64-linux-nat.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 237f2c7525b..9b5fbf3d8ae 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -649,13 +649,14 @@ static int ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p) { CORE_ADDR psr; - siginfo_t *siginfo_p; + siginfo_t siginfo; struct regcache *regcache = get_current_regcache (); - 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; regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr); @@ -663,7 +664,7 @@ ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p) for the next instruction. */ regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr); - *addr_p = (CORE_ADDR)siginfo_p->si_addr; + *addr_p = (CORE_ADDR) siginfo.si_addr; return 1; } |