summaryrefslogtreecommitdiff
path: root/gdb/sparc-linux-tdep.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2005-04-21 19:38:20 +0000
committerDavid S. Miller <davem@redhat.com>2005-04-21 19:38:20 +0000
commita2bd52e6357a59aead84504213b0f8c37efdfb5a (patch)
tree2c3acbe503dfef0d518c3e2ce8ac7333b297999b /gdb/sparc-linux-tdep.c
parent09730bdcb100005579b892d34bbdc2e82257454a (diff)
downloadgdb-a2bd52e6357a59aead84504213b0f8c37efdfb5a.tar.gz
* sparc-linux-tdep.c (sparc32_linux_sigtramp_p): Fix
signal return stub symbol names, __restore and __restore_rt are the i386 symbol names not the sparc ones. (sparc32_linux_sigtramp_frame_cache): Document bits/sigcontext.h as where the offsets were obtained from. * sparc64-linux-tdep.c (LINUX64_RT_SIGTRAMP_INSN0, LINUX64_RT_SIGTRAMP_INSN1): New defines. (sparc64_linux_sigtramp_start, sparc64_linux_sigtramp_p, sparc64_linux_sigtramp_frame_cache, sparc64_linux_sigtramp_frame_this_id, sparc64_linux_sigtramp_frame_prev_register, sparc64_linux_sigtramp_frame_sniffer): New functions. (sparc64_linux_sigtramp_frame_unwind): New frame unwinder. (sparc64_linux_init_abi): Register sigtramp frame sniffer. * Makefile.in (sparc64-linux-tdep.o): Update dependencies.
Diffstat (limited to 'gdb/sparc-linux-tdep.c')
-rw-r--r--gdb/sparc-linux-tdep.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index 36c0565e468..db403655245 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -144,16 +144,17 @@ sparc32_linux_sigtramp_p (struct frame_info *next_frame)
find_pc_partial_function (pc, &name, NULL, NULL);
/* If we have NAME, we can optimize the search. The trampolines are
- named __restore and __restore_rt. However, they aren't dynamically
- exported from the shared C library, so the trampoline may appear to
- be part of the preceding function. This should always be sigaction,
- __sigaction, or __libc_sigaction (all aliases to the same function). */
+ named __sigreturn_stub and __rt_sigreturn_stub. However, they
+ aren't dynamically exported from the shared C library, so the
+ trampoline may appear to be part of the preceding function. This
+ should always be sigaction, __sigaction, or __libc_sigaction (all
+ aliases to the same function). */
if (name == NULL || strstr (name, "sigaction") != NULL)
return (sparc32_linux_sigtramp_start (next_frame) != 0
|| sparc32_linux_rt_sigtramp_start (next_frame) != 0);
- return (strcmp ("__restore", name) == 0
- || strcmp ("__restore_rt", name) == 0);
+ return (strcmp ("__sigreturn_stub", name) == 0
+ || strcmp ("__rt_sigreturn_stub", name) == 0);
}
static struct sparc_frame_cache *
@@ -192,6 +193,8 @@ sparc32_linux_sigtramp_frame_cache (struct frame_info *next_frame,
cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+ /* Offsets from <bits/sigcontext.h> */
+
cache->saved_regs[SPARC32_PSR_REGNUM].addr = sigcontext_addr + 0;
cache->saved_regs[SPARC32_PC_REGNUM].addr = sigcontext_addr + 4;
cache->saved_regs[SPARC32_NPC_REGNUM].addr = sigcontext_addr + 8;