static struct value * m88k_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum) { struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache); if (regnum == M88K_SNIP_REGNUM || regnum == M88K_SFIP_REGNUM) { struct value *value; CORE_ADDR pc; value = trad_frame_get_prev_register (this_frame, cache->saved_regs, M88K_SXIP_REGNUM); pc = value_as_long (value); release_value (value); value_free (value); if (regnum == M88K_SFIP_REGNUM) pc += 4; return frame_unwind_got_constant (this_frame, regnum, pc + 4); } return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum); }
static void m88k_frame_prev_register (struct frame_info *next_frame, void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, gdb_byte *valuep) { struct m88k_frame_cache *cache = m88k_frame_cache (next_frame, this_cache); if (regnum == M88K_SNIP_REGNUM || regnum == M88K_SFIP_REGNUM) { if (valuep) { CORE_ADDR pc; trad_frame_get_prev_register (next_frame, cache->saved_regs, M88K_SXIP_REGNUM, optimizedp, lvalp, addrp, realnump, valuep); pc = extract_unsigned_integer (valuep, 4); if (regnum == M88K_SFIP_REGNUM) pc += 4; store_unsigned_integer (valuep, 4, pc + 4); } /* It's a computed value. */ *optimizedp = 0; *lvalp = not_lval; *addrp = 0; *realnump = -1; return; } trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum, optimizedp, lvalp, addrp, realnump, valuep); }
static CORE_ADDR m88k_frame_base_address (struct frame_info *this_frame, void **this_cache) { struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache); if (cache->fp_offset != -1) return cache->base + cache->sp_offset + cache->fp_offset; return 0; }
static void m88k_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id) { struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache); /* This marks the outermost frame. */ if (cache->base == 0) return; (*this_id) = frame_id_build (cache->base, cache->pc); }