static struct sparc_frame_cache * sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame, void **this_cache) { struct sparc_frame_cache *cache; CORE_ADDR addr; if (*this_cache) return *this_cache; cache = sparc_frame_cache (this_frame, this_cache); gdb_assert (cache == *this_cache); /* If we couldn't find the frame's function, we're probably dealing with an on-stack signal trampoline. */ if (cache->pc == 0) { cache->pc = sparc32nbsd_sigtramp_start; /* Since we couldn't find the frame's function, the cache was initialized under the assumption that we're frameless. */ sparc_record_save_insn (cache); addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM); cache->base = addr; } cache->saved_regs = sparc32nbsd_sigcontext_saved_regs (this_frame); return cache; }
static struct sparc_frame_cache * sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache) { struct sparc_frame_cache *cache; CORE_ADDR addr; if (*this_cache) return (struct sparc_frame_cache *) *this_cache; cache = sparc_frame_cache (this_frame, this_cache); gdb_assert (cache == *this_cache); /* If we couldn't find the frame's function, we're probably dealing with an on-stack signal trampoline. */ if (cache->pc == 0) { cache->pc = get_frame_pc (this_frame); cache->pc &= ~(sparc64obsd_page_size - 1); /* Since we couldn't find the frame's function, the cache was initialized under the assumption that we're frameless. */ sparc_record_save_insn (cache); addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM); if (addr & 1) addr += BIAS; cache->base = addr; } /* We find the appropriate instance of `struct sigcontext' at a fixed offset in the signal frame. */ addr = cache->base + 128 + 16; cache->saved_regs = sparc64nbsd_sigcontext_saved_regs (addr, this_frame); return cache; }