2007-10-08 Markus Deuling <deuling@de.ibm.com>
+ * amd64-tdep.c (amd64_frame_prev_register, amd64_sigtramp_frame_cache):
+ Use get_regcache_arch or get_frame_arch to get at the current
+ architecture by regcache or by frame, respectively.
+ * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Likewise.
+ * amd64-nat.c (amd64_supply_native_gregset)
+ (amd64_collect_native_gregset): Replace current_gdbarch by gdbarch.
+
+2007-10-08 Markus Deuling <deuling@de.ibm.com>
+
* alpha-tdep.c (alpha_register_reggroup_p): Replace current_gdbarch by
gdbarch.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
CORE_ADDR sp;
gdb_byte buf[8];
- frame_unwind_register (next_frame, gdbarch_sp_regnum (current_gdbarch), buf);
+ frame_unwind_register (next_frame,
+ gdbarch_sp_regnum (get_frame_arch (next_frame)), buf);
sp = extract_unsigned_integer (buf, 8);
/* The sigcontext structure is part of the user context. A pointer
if (gdbarch_ptr_bit (gdbarch) == 32)
num_regs = amd64_native_gregset32_num_regs;
- if (num_regs > gdbarch_num_regs (current_gdbarch))
- num_regs = gdbarch_num_regs (current_gdbarch);
+ if (num_regs > gdbarch_num_regs (gdbarch))
+ num_regs = gdbarch_num_regs (gdbarch);
for (i = 0; i < num_regs; i++)
{
}
}
- if (num_regs > gdbarch_num_regs (current_gdbarch))
- num_regs = gdbarch_num_regs (current_gdbarch);
+ if (num_regs > gdbarch_num_regs (gdbarch))
+ num_regs = gdbarch_num_regs (gdbarch);
for (i = 0; i < num_regs; i++)
{
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, gdb_byte *valuep)
{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
struct amd64_frame_cache *cache =
amd64_frame_cache (next_frame, this_cache);
gdb_assert (regnum >= 0);
- if (regnum == gdbarch_sp_regnum (current_gdbarch) && cache->saved_sp)
+ if (regnum == gdbarch_sp_regnum (gdbarch) && cache->saved_sp)
{
*optimizedp = 0;
*lvalp = not_lval;
{
/* Read the value in from memory. */
read_memory (*addrp, valuep,
- register_size (current_gdbarch, regnum));
+ register_size (gdbarch, regnum));
}
return;
}
amd64_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct amd64_frame_cache *cache;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame));
CORE_ADDR addr;
gdb_byte buf[8];
int i;