diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-03-26 15:20:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-03-26 15:20:42 +0000 |
commit | a77f4086a1ea45d21b7804e5061aa71a43c1ad9f (patch) | |
tree | 249bc05d395729db4987102398e61d9e5dda0f92 /gdb/dwarf2-frame.c | |
parent | 7c834684b638b78f7f13161f8e5c8b81826d694c (diff) | |
download | gdb-a77f4086a1ea45d21b7804e5061aa71a43c1ad9f.zip gdb-a77f4086a1ea45d21b7804e5061aa71a43c1ad9f.tar.gz gdb-a77f4086a1ea45d21b7804e5061aa71a43c1ad9f.tar.bz2 |
* dwarf2-frame.c (execute_cfa_program): Implement
DW_CFA_GNU_window_save.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 7b46c78..1ac1859 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -445,6 +445,31 @@ bad CFI data; mismatched DW_CFA_restore_state at 0x%s"), paddr (fs->pc)); /* cfa_how deliberately not set. */ break; + case DW_CFA_GNU_window_save: + /* This is SPARC-specific code, and contains hard-coded + constants for the register numbering scheme used by + GCC. Rather than having a architecture-specific + operation that's only ever used by a single + architecture, we provide the implementation here. + Incidentally that's what GCC does too in its + unwinder. */ + { + struct gdbarch *gdbarch = get_frame_arch (next_frame); + int size = register_size(gdbarch, 0); + dwarf2_frame_state_alloc_regs (&fs->regs, 32); + for (reg = 8; reg < 16; reg++) + { + fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_REG; + fs->regs.reg[reg].loc.reg = reg + 16; + } + for (reg = 16; reg < 32; reg++) + { + fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = (reg - 16) * size; + } + } + break; + case DW_CFA_GNU_args_size: /* Ignored. */ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp); |