diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:46:09 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:46:09 +0000 |
commit | 396df9e2fd7fa42202663bdf21e09ffe8f444714 (patch) | |
tree | bcee8afe5ef54cf1c5210375c678a8e9455b1ca1 /gdb/dwarf2-frame.c | |
parent | 3328715e45b492fa47b755098e5e54952cc8f1c6 (diff) | |
download | gdb-396df9e2fd7fa42202663bdf21e09ffe8f444714.tar.gz |
2007-10-08 Markus Deuling <deuling@de.ibm.com>
* dwarf2-frame.c (read_reg, execute_cfa_program, dwarf2_frame_cache)
(dwarf2_frame_default_init_reg, dwarf2_frame_prev_register): Replace
current_gdbarch by gdbarch.
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Likewise.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 731f9813517..c84fe492a7d 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -235,7 +235,7 @@ read_reg (void *baton, int reg) int regnum; gdb_byte *buf; - regnum = gdbarch_dwarf2_reg_to_regnum (current_gdbarch, reg); + regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, reg); buf = alloca (register_size (gdbarch, regnum)); frame_unwind_register (next_frame, regnum, buf); @@ -338,9 +338,8 @@ execute_cfa_program (gdb_byte *insn_ptr, gdb_byte *insn_end, incomplete CFI data; DW_CFA_restore unspecified\n\ register %s (#%d) at 0x%s"), gdbarch_register_name - (current_gdbarch, gdbarch_dwarf2_reg_to_regnum - (current_gdbarch, reg)), - gdbarch_dwarf2_reg_to_regnum (current_gdbarch, reg), + (gdbarch, gdbarch_dwarf2_reg_to_regnum (gdbarch, reg)), + gdbarch_dwarf2_reg_to_regnum (gdbarch, reg), paddr (fs->pc)); } else @@ -647,9 +646,9 @@ dwarf2_frame_default_init_reg (struct gdbarch *gdbarch, int regnum, (e.g. IBM S/390 and zSeries). Those architectures should provide their own architecture-specific initialization function. */ - if (regnum == gdbarch_pc_regnum (current_gdbarch)) + if (regnum == gdbarch_pc_regnum (gdbarch)) reg->how = DWARF2_FRAME_REG_RA; - else if (regnum == gdbarch_sp_regnum (current_gdbarch)) + else if (regnum == gdbarch_sp_regnum (gdbarch)) reg->how = DWARF2_FRAME_REG_CFA; } @@ -809,8 +808,8 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) { struct cleanup *old_chain; struct gdbarch *gdbarch = get_frame_arch (next_frame); - const int num_regs = gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + const int num_regs = gdbarch_num_regs (gdbarch) + + gdbarch_num_pseudo_regs (gdbarch); struct dwarf2_frame_cache *cache; struct dwarf2_frame_state *fs; struct dwarf2_fde *fde; @@ -909,7 +908,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) for (column = 0; column < fs->regs.num_regs; column++) { /* Use the GDB register number as the destination index. */ - int regnum = gdbarch_dwarf2_reg_to_regnum (current_gdbarch, column); + int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, column); /* If there's no corresponding GDB register, ignore it. */ if (regnum < 0 || regnum >= num_regs) @@ -1068,7 +1067,7 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache, *lvalp = lval_register; *addrp = 0; *realnump = gdbarch_dwarf2_reg_to_regnum - (current_gdbarch, cache->reg[regnum].loc.reg); + (gdbarch, cache->reg[regnum].loc.reg); if (valuep) frame_unwind_register (next_frame, (*realnump), valuep); break; @@ -1163,7 +1162,7 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache, CORE_ADDR pc = cache->reg[regnum].loc.offset; regnum = gdbarch_dwarf2_reg_to_regnum - (current_gdbarch, cache->retaddr_reg.loc.reg); + (gdbarch, cache->retaddr_reg.loc.reg); pc += frame_unwind_register_unsigned (next_frame, regnum); pack_long (valuep, register_type (gdbarch, regnum), pc); } |