static CORE_ADDR alpha_linux_sigcontext_addr (struct frame_info *this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc; ULONGEST sp; long off; pc = get_frame_pc (this_frame); sp = get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM); off = alpha_linux_sigtramp_offset (gdbarch, pc); gdb_assert (off >= 0); /* __NR_rt_sigreturn has a couple of structures on the stack. This is: struct rt_sigframe { struct siginfo info; struct ucontext uc; }; offsetof (struct rt_sigframe, uc.uc_mcontext); */ if (alpha_read_insn (gdbarch, pc - off + 4) == 0x201f015f) return sp + 176; /* __NR_sigreturn has the sigcontext structure at the top of the stack. */ return sp; }
static CORE_ADDR alpha_linux_sigcontext_addr (struct frame_info *next_frame) { CORE_ADDR pc; ULONGEST sp; long off; pc = frame_pc_unwind (next_frame); frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp); off = alpha_linux_sigtramp_offset (pc); gdb_assert (off >= 0); /* __NR_rt_sigreturn has a couple of structures on the stack. This is: struct rt_sigframe { struct siginfo info; struct ucontext uc; }; offsetof (struct rt_sigframe, uc.uc_mcontext); */ if (alpha_read_insn (pc - off + 4) == 0x201f015f) return sp + 176; /* __NR_sigreturn has the sigcontext structure at the top of the stack. */ return sp; }
static int alpha_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *func_name) { return alpha_linux_sigtramp_offset (gdbarch, pc) >= 0; }
static int alpha_linux_pc_in_sigtramp (CORE_ADDR pc, char *func_name) { return alpha_linux_sigtramp_offset (pc) >= 0; }