/* Frame unwinder for frames with DWARF Call Frame Information.
- Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Mark Kettenis.
CORE_ADDR result;
ctx = new_dwarf_expr_context ();
+ ctx->gdbarch = get_frame_arch (this_frame);
ctx->addr_size = addr_size;
ctx->baton = this_frame;
ctx->read_reg = read_reg;
instruction in the associated delay slot). This should only be
done for "normal" frames and not for resume-type frames (signal
handlers, sentinel frames, dummy frames). The function
- frame_unwind_address_in_block does just this. It's not clear how
+ get_frame_address_in_block does just this. It's not clear how
reliable the method is though; there is the potential for the
register state pre-call being different to that on return. */
fs->pc = get_frame_address_in_block (this_frame);
/* Then decode the insns in the FDE up to our target PC. */
execute_cfa_program (fde, fde->instructions, fde->end, this_frame, fs);
- /* Caclulate the CFA. */
+ /* Calculate the CFA. */
switch (fs->cfa_how)
{
case CFA_REG_OFFSET:
addr += get_frame_register_unsigned (this_frame, regnum);
return frame_unwind_got_address (this_frame, regnum, addr);
+ case DWARF2_FRAME_REG_FN:
+ return cache->reg[regnum].loc.fn (this_frame, this_cache, regnum);
+
default:
internal_error (__FILE__, __LINE__, _("Unknown register rule."));
}