aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2-frame.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
committerYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
commitb348037fd8c0de5c39cc43970697c51048a8ec9c (patch)
treee8dc533380fb70ea14033f9d3c4547fecd8d3142 /gdb/dwarf2-frame.c
parent5af3691c758717e295ba4d03b800f3462a404056 (diff)
downloadgdb-b348037fd8c0de5c39cc43970697c51048a8ec9c.zip
gdb-b348037fd8c0de5c39cc43970697c51048a8ec9c.tar.gz
gdb-b348037fd8c0de5c39cc43970697c51048a8ec9c.tar.bz2
Move dwarf2_frame_state_reg.exp_len to union .loc
dwarf2_frame_state_reg.exp_len is only used together with .loc.exp, so it makes more sense to exp_len to the union as well. gdb: 2017-08-11 Yao Qi <yao.qi@linaro.org> * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove. <loc.exp>: New field. * dwarf2-frame.c (execute_cfa_program): Update. (dwarf2_frame_prev_register): Update.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r--gdb/dwarf2-frame.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index d7f985b..191f60a 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -561,8 +561,8 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
reg = dwarf2_frame_adjust_regnum (gdbarch, reg, eh_frame_p);
dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
insn_ptr = safe_read_uleb128 (insn_ptr, insn_end, &utmp);
- fs->regs.reg[reg].loc.exp = insn_ptr;
- fs->regs.reg[reg].exp_len = utmp;
+ fs->regs.reg[reg].loc.exp.start = insn_ptr;
+ fs->regs.reg[reg].loc.exp.len = utmp;
fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_EXP;
insn_ptr += utmp;
break;
@@ -599,8 +599,8 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
insn_ptr = safe_read_uleb128 (insn_ptr, insn_end, &reg);
dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
insn_ptr = safe_read_uleb128 (insn_ptr, insn_end, &utmp);
- fs->regs.reg[reg].loc.exp = insn_ptr;
- fs->regs.reg[reg].exp_len = utmp;
+ fs->regs.reg[reg].loc.exp.start = insn_ptr;
+ fs->regs.reg[reg].loc.exp.len = utmp;
fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_VAL_EXP;
insn_ptr += utmp;
break;
@@ -1286,8 +1286,8 @@ dwarf2_frame_prev_register (struct frame_info *this_frame, void **this_cache,
return frame_unwind_got_register (this_frame, regnum, realnum);
case DWARF2_FRAME_REG_SAVED_EXP:
- addr = execute_stack_op (cache->reg[regnum].loc.exp,
- cache->reg[regnum].exp_len,
+ addr = execute_stack_op (cache->reg[regnum].loc.exp.start,
+ cache->reg[regnum].loc.exp.len,
cache->addr_size, cache->text_offset,
this_frame, cache->cfa, 1);
return frame_unwind_got_memory (this_frame, regnum, addr);
@@ -1297,8 +1297,8 @@ dwarf2_frame_prev_register (struct frame_info *this_frame, void **this_cache,
return frame_unwind_got_constant (this_frame, regnum, addr);
case DWARF2_FRAME_REG_SAVED_VAL_EXP:
- addr = execute_stack_op (cache->reg[regnum].loc.exp,
- cache->reg[regnum].exp_len,
+ addr = execute_stack_op (cache->reg[regnum].loc.exp.start,
+ cache->reg[regnum].loc.exp.len,
cache->addr_size, cache->text_offset,
this_frame, cache->cfa, 1);
return frame_unwind_got_constant (this_frame, regnum, addr);