aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-08 12:46:09 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-08 12:46:09 +0000
commitad010def8947cff19c8fbc2678fbf8b2dc6935e9 (patch)
tree805406eeb5028c0014949da60f1e8c75b316e14e /gdb
parent214e098a2a3bf57e25b443e2972a65a7e151b0ed (diff)
downloadgdb-ad010def8947cff19c8fbc2678fbf8b2dc6935e9.zip
gdb-ad010def8947cff19c8fbc2678fbf8b2dc6935e9.tar.gz
gdb-ad010def8947cff19c8fbc2678fbf8b2dc6935e9.tar.bz2
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')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dwarf2-frame.c21
-rw-r--r--gdb/dwarf2loc.c4
3 files changed, 19 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1a7afee..0350bbe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
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.
+
+2007-10-08 Markus Deuling <deuling@de.ibm.com>
+
* regcache.c (init_regcache_descr, register_type, read_pc_pid)
(write_pc_pid, regcache_dump): Replace current_gdbarch by gdbarch.
* regcache.c (regcache_raw_write): Use get_regcache_arch or
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 731f981..c84fe49 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);
}
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 76d7f6e..e9d1709 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -230,7 +230,7 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
{
bfd_byte regval[MAX_REGISTER_SIZE];
int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
- (current_gdbarch, p->value);
+ (arch, p->value);
get_frame_register (frame, gdb_regnum, regval);
memcpy (contents + offset, regval, p->size);
}
@@ -245,7 +245,7 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
{
CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0);
int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
- (current_gdbarch, dwarf_regnum);
+ (arch, dwarf_regnum);
retval = value_from_register (SYMBOL_TYPE (var), gdb_regnum, frame);
}
else