* infrun.c (handle_inferior_event): If
[deliverable/binutils-gdb.git] / gdb / go32-nat.c
index b4b86728aa1fce7cdd46da9b7ebd57940ea011ff..5173251b321b5dce6926f2617b560a7ba6eba3fc 100644 (file)
@@ -1,5 +1,5 @@
 /* Native debugging support for Intel x86 running DJGPP.
-   Copyright (C) 1997, 1999, 2000, 2001, 2005, 2006, 2007
+   Copyright (C) 1997, 1999, 2000, 2001, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Written by Robert Hoehne.
 
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
 
@@ -177,7 +175,7 @@ static ptid_t go32_wait (ptid_t ptid,
 static void go32_fetch_registers (struct regcache *, int regno);
 static void store_register (const struct regcache *, int regno);
 static void go32_store_registers (struct regcache *, int regno);
-static void go32_prepare_to_store (void);
+static void go32_prepare_to_store (struct regcache *);
 static int go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
                             int write,
                             struct mem_attrib *attrib,
@@ -467,7 +465,7 @@ go32_wait (ptid_t ptid, struct target_waitstatus *status)
 static void
 fetch_register (struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
+  if (regno < gdbarch_fp0_regnum (get_regcache_arch (regcache)))
     regcache_raw_supply (regcache, regno,
                         (char *) &a_tss + regno_mapping[regno].tss_ofs);
   else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
@@ -484,7 +482,9 @@ go32_fetch_registers (struct regcache *regcache, int regno)
     fetch_register (regcache, regno);
   else
     {
-      for (regno = 0; regno < FP0_REGNUM; regno++)
+      for (regno = 0;
+          regno < gdbarch_fp0_regnum (get_regcache_arch (regcache));
+          regno++)
        fetch_register (regcache, regno);
       i387_supply_fsave (regcache, -1, &npx);
     }
@@ -493,7 +493,7 @@ go32_fetch_registers (struct regcache *regcache, int regno)
 static void
 store_register (const struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
+  if (regno < gdbarch_fp0_regnum (get_regcache_arch (regcache)))
     regcache_raw_collect (regcache, regno,
                          (char *) &a_tss + regno_mapping[regno].tss_ofs);
   else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
@@ -512,14 +512,14 @@ go32_store_registers (struct regcache *regcache, int regno)
     store_register (regcache, regno);
   else
     {
-      for (r = 0; r < FP0_REGNUM; r++)
+      for (r = 0; r < gdbarch_fp0_regnum (get_regcache_arch (regcache)); r++)
        store_register (regcache, r);
       i387_collect_fsave (regcache, -1, &npx);
     }
 }
 
 static void
-go32_prepare_to_store (void)
+go32_prepare_to_store (struct regcache *regcache)
 {
 }
 
This page took 0.025227 seconds and 4 git commands to generate.