diff -urpN src/gdb/win32-nat.c dev/gdb/win32-nat.c --- src/gdb/win32-nat.c 2007-09-04 03:12:18.000000000 +0200 +++ dev/gdb/win32-nat.c 2007-10-11 10:06:39.000000000 +0200 @@ -397,7 +397,7 @@ do_win32_fetch_inferior_registers (struc regcache_raw_supply (regcache, r, context_offset); else { - for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++) + for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++) do_win32_fetch_inferior_registers (regcache, r); } @@ -424,7 +424,7 @@ do_win32_store_inferior_registers (const ((char *) ¤t_thread->context) + mappings[r]); else { - for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++) + for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++) do_win32_store_inferior_registers (regcache, r); } } @@ -1211,7 +1211,8 @@ win32_resume (ptid_t ptid, int step, enu { /* Single step by setting t bit */ win32_fetch_inferior_registers (get_current_regcache (), - gdbarch_ps_regnum (current_gdbarch)); + gdbarch_ps_regnum (get_regcache_arch + (get_current_regcache ()))); th->context.EFlags |= FLAG_TRACE_BIT; }