-/* Signal trampolines. */
-
-static void
-m68kobsd_sigtramp_cache_init (const struct tramp_frame *self,
- struct frame_info *this_frame,
- struct trad_frame_cache *this_cache,
- CORE_ADDR func)
-{
- CORE_ADDR addr, base, pc;
- int regnum;
-
- base = get_frame_register_unsigned (this_frame, M68K_SP_REGNUM);
-
- /* The 'addql #4,%sp' instruction at offset 8 adjusts the stack
- pointer. Adjust the frame base accordingly. */
- pc = get_frame_register_unsigned (this_frame, M68K_PC_REGNUM);
- if ((pc - func) > 8)
- base -= 4;
-
- /* Get frame pointer, stack pointer, program counter and processor
- state from `struct sigcontext'. */
- addr = get_frame_memory_unsigned (this_frame, base + 8, 4);
- trad_frame_set_reg_addr (this_cache, M68K_FP_REGNUM, addr + 8);
- trad_frame_set_reg_addr (this_cache, M68K_SP_REGNUM, addr + 12);
- trad_frame_set_reg_addr (this_cache, M68K_PC_REGNUM, addr + 20);
- trad_frame_set_reg_addr (this_cache, M68K_PS_REGNUM, addr + 24);
-
- /* The sc_ap member of `struct sigcontext' points to additional
- hardware state. Here we find the missing registers. */
- addr = get_frame_memory_unsigned (this_frame, addr + 16, 4) + 4;
- for (regnum = M68K_D0_REGNUM; regnum < M68K_FP_REGNUM; regnum++, addr += 4)
- trad_frame_set_reg_addr (this_cache, regnum, addr);
-
- /* Construct the frame ID using the function start. */
- trad_frame_set_id (this_cache, frame_id_build (base, func));
-}
-
-static const struct tramp_frame m68kobsd_sigtramp = {
- SIGTRAMP_FRAME,
- 2,
- {
- { 0x206f, -1 }, { 0x000c, -1}, /* moveal %sp@(12),%a0 */
- { 0x4e90, -1 }, /* jsr %a0@ */
- { 0x588f, -1 }, /* addql #4,%sp */
- { 0x4e41, -1 }, /* trap #1 */
- { 0x2f40, -1 }, { 0x0004, -1 }, /* moveal %d0,%sp@(4) */
- { 0x7001, -1 }, /* moveq #SYS_exit,%d0 */
- { 0x4e40, -1 }, /* trap #0 */
- { TRAMP_SENTINEL_INSN, -1 }
- },
- m68kobsd_sigtramp_cache_init
-};
-\f
-