- CORE_ADDR pc = frame_pc_unwind (next_frame);
- ULONGEST word0, word1;
- unsigned char buf[8]; /* Two instructions. */
-
- /* We only recognize a signal trampoline if PC is at the start of
- one of the instructions. We optimize for finding the PC at the
- start of the instruction sequence, as will be the case when the
- trampoline is not the first frame on the stack. We assume that
- in the case where the PC is not at the start of the instruction
- sequence, there will be a few trailing readable bytes on the
- stack. */
-
- if (!safe_frame_unwind_memory (next_frame, pc, buf, sizeof buf))
- return 0;
-
- word0 = extract_unsigned_integer (buf, 4);
- if (word0 != LINUX64_RT_SIGTRAMP_INSN0)
- {
- if (word0 != LINUX64_RT_SIGTRAMP_INSN1)
- return 0;
-
- pc -= 4;
- if (!safe_frame_unwind_memory (next_frame, pc, buf, sizeof buf))
- return 0;
-
- word0 = extract_unsigned_integer (buf, 4);
- }
-
- word1 = extract_unsigned_integer (buf + 4, 4);
- if (word0 != LINUX64_RT_SIGTRAMP_INSN0
- || word1 != LINUX64_RT_SIGTRAMP_INSN1)
- return 0;
-
- return pc;
-}
-
-static int
-sparc64_linux_sigtramp_p (struct frame_info *next_frame)
-{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- char *name;
-
- find_pc_partial_function (pc, &name, NULL, NULL);
-
- /* If we have NAME, we can optimize the search. The trampolines is
- named __rt_sigreturn_stub. However, is isn'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 (sparc64_linux_sigtramp_start (next_frame) != 0);
-
- return (strcmp ("__rt_sigreturn_stub", name) == 0);
-}
+ SIGTRAMP_FRAME,
+ 4,
+ {
+ { 0x82102065, -1 }, /* mov __NR_rt_sigreturn, %g1 */
+ { 0x91d0206d, -1 }, /* ta 0x6d */
+ { TRAMP_SENTINEL_INSN, -1 }
+ },
+ sparc64_linux_sigframe_init
+};