gdb/gdb-6.5-bz165025-DW_CFA_GNU_negative_offset_extended-fix.patch
Jan Kratochvil 803b8bdf52 - Fix unwinding crash on older gcj(1) code (extended CFI support) (BZ
165025).
- Include testcase for the readline history of input mode commands (BZ
    215816).
- Related: rhbz#165025 rhbz#215816
2006-12-30 20:59:07 +00:00

31 lines
1.1 KiB
Diff

2006-12-30 Andrew Cagney <cagney@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2-frame.c (execute_cfa_program): New support of
`DW_CFA_GNU_negative_offset_extended'.
Index: ./gdb/dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.64
diff -u -p -r1.64 dwarf2-frame.c
--- ./gdb/dwarf2-frame.c 28 Nov 2006 17:28:29 -0000 1.64
+++ ./gdb/dwarf2-frame.c 30 Dec 2006 18:24:58 -0000
@@ -555,6 +555,15 @@ bad CFI data; mismatched DW_CFA_restore_
insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
break;
+ case DW_CFA_GNU_negative_offset_extended:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &offset);
+ offset *= fs->data_align;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET;
+ fs->regs.reg[reg].loc.offset = -offset;
+ break;
+
default:
internal_error (__FILE__, __LINE__, _("Unknown CFI encountered."));
}