2007-10-09 Markus Deuling <deuling@de.ibm.com>

* i386-linux-nat.c (fetch_register): Use get_regcache_arch to get at
	the current architecture by regcache.
	(store_register, supply_gregset, fill_gregset, i386_linux_resume)
	(i386_linux_fetch_inferior_registers)
	(i386_linux_store_inferior_registers): Likewise.
	* i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Likewise.
	* i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
	* i386v4-nat.c (supply_fpregset, fill_fpregset): Likewise.
	* i386-tdep.c (i386_unwind_pc): Replace current_gdbarch by gdbarch.
	(i386_extract_return_value, i386_store_return_value): Likewise.
	* i386-tdep.c (i386_frame_prev_register): Use get_frame_arch to get at
	the current architecture by frame_info.
	(i386_sigtramp_frame_cache, i386_get_longjmp_target)
	(i386_register_to_value, i386_value_to_register): Likewise.
This commit is contained in:
Ulrich Weigand 2007-10-09 18:18:50 +00:00
parent 9b072297d8
commit 875f8d0e3a
6 changed files with 48 additions and 26 deletions

View file

@ -149,7 +149,8 @@ gnu_fetch_registers (struct regcache *regcache, int regno)
else
{
proc_debug (thread, "fetching register %s",
gdbarch_register_name (current_gdbarch, regno));
gdbarch_register_name (get_regcache_arch (regcache),
regno));
regcache_raw_supply (regcache, regno,
REG_ADDR (state, regno));
@ -203,6 +204,7 @@ void
gnu_store_registers (struct regcache *regcache, int regno)
{
struct proc *thread;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
/* Make sure we know about new threads. */
inf_update_procs (current_inferior);
@ -243,11 +245,11 @@ gnu_store_registers (struct regcache *regcache, int regno)
if ((thread->fetched_regs & (1 << check_regno))
&& memcpy (REG_ADDR (&old_state, check_regno),
REG_ADDR (state, check_regno),
register_size (current_gdbarch, check_regno)))
register_size (gdbarch, check_regno)))
/* Register CHECK_REGNO has changed! Ack! */
{
warning (_("Register %s changed after the thread was aborted"),
gdbarch_register_name (current_gdbarch, check_regno));
gdbarch_register_name (gdbarch, check_regno));
if (regno >= 0 && regno != check_regno)
/* Update GDB's copy of the register. */
regcache_raw_supply (regcache, check_regno,
@ -270,7 +272,7 @@ gnu_store_registers (struct regcache *regcache, int regno)
else
{
proc_debug (thread, "storing register %s",
gdbarch_register_name (current_gdbarch, regno));
gdbarch_register_name (gdbarch, regno));
gdb_assert (regcache_valid_p (regcache, regno));
regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));