* dwarf2-frame.c (execute_cfa_program): Move DWA_CFA_nop before
authorMark Kettenis <kettenis@gnu.org>
Sun, 18 Jan 2004 21:22:50 +0000 (21:22 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 18 Jan 2004 21:22:50 +0000 (21:22 +0000)
DW_CFA_def_cfa_exporession.  Add support for
DW_CFA_offset_extendend_sf, DW_CFA_def_cfa_sf and
DW_CFA_def_cfa_offset_sf.  This should fix PR backtrace/1391.

gdb/ChangeLog
gdb/dwarf2-frame.c

index 1e06e3e7d9e3bd0dde75462415b84ba9401debcb..7772813ed4c34137d53aabf46ae078a37c635e8f 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-18  Mark Kettenis  <kettenis@gnu.org>
+
+       * dwarf2-frame.c (execute_cfa_program): Move DWA_CFA_nop before
+       DW_CFA_def_cfa_exporession.  Add support for
+       DW_CFA_offset_extendend_sf, DW_CFA_def_cfa_sf and
+       DW_CFA_def_cfa_offset_sf.  This should fix PR backtrace/1391.
+
 2004-01-18  Andrew Cagney  <cagney@redhat.com>
 
        * ocd.c: Update copyright.
index 84bc1c2d50caf2aae9b7a9344531f419f8fc22f0..2c655d9793cde5204f639a40a768e5173851f446 100644 (file)
@@ -432,6 +432,9 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
              /* cfa_how deliberately not set.  */
              break;
 
+           case DW_CFA_nop:
+             break;
+
            case DW_CFA_def_cfa_expression:
              insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_exp_len);
              fs->cfa_exp = insn_ptr;
@@ -449,7 +452,26 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
              insn_ptr += utmp;
              break;
 
-           case DW_CFA_nop:
+           case DW_CFA_offset_extended_sf:
+             insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+             insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
+             offset += fs->data_align;
+             dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+             fs->regs.reg[reg].how = REG_SAVED_OFFSET;
+             fs->regs.reg[reg].loc.offset = offset;
+             break;
+
+           case DW_CFA_def_cfa_sf:
+             insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
+             insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
+             fs->cfa_offset = offset * fs->data_align;
+             fs->cfa_how = CFA_REG_OFFSET;
+             break;
+
+           case DW_CFA_def_cfa_offset_sf:
+             insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
+             fs->cfa_offset = offset * fs->data_align;
+             /* cfa_how deliberately not set.  */
              break;
 
            case DW_CFA_GNU_args_size: