2007-07-02 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / win32-nat.c
index 922cc2861950d1fc963985d7811a3960eddff3f5..d312d17bc69fa1f35d0cad68286fdfd7d2c6bbf3 100644 (file)
@@ -396,7 +396,7 @@ do_win32_fetch_inferior_registers (struct regcache *regcache, int r)
     regcache_raw_supply (regcache, r, context_offset);
   else
     {
-      for (r = 0; r < NUM_REGS; r++)
+      for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++)
        do_win32_fetch_inferior_registers (regcache, r);
     }
 
@@ -423,7 +423,7 @@ do_win32_store_inferior_registers (const struct regcache *regcache, int r)
                          ((char *) &current_thread->context) + mappings[r]);
   else
     {
-      for (r = 0; r < NUM_REGS; r++)
+      for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++)
        do_win32_store_inferior_registers (regcache, r);
     }
 }
@@ -1318,7 +1318,8 @@ win32_resume (ptid_t ptid, int step, enum target_signal sig)
       if (step)
        {
          /* Single step by setting t bit */
-         win32_fetch_inferior_registers (current_regcache, PS_REGNUM);
+         win32_fetch_inferior_registers (get_current_regcache (),
+                                         gdbarch_ps_regnum (current_gdbarch));
          th->context.EFlags |= FLAG_TRACE_BIT;
        }
 
@@ -2039,7 +2040,7 @@ win32_kill_inferior (void)
 }
 
 static void
-win32_prepare_to_store (void)
+win32_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
 }
@@ -2256,7 +2257,7 @@ fetch_elf_core_registers (struct regcache *regcache,
       error (_("Core file register section too small (%u bytes)."), core_reg_size);
       return;
     }
-  for (r = 0; r < NUM_REGS; r++)
+  for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++)
     regcache_raw_supply (regcache, r, core_reg_sect + mappings[r]);
 }
 
This page took 0.023548 seconds and 4 git commands to generate.