2004-11-08 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / hppa-linux-nat.c
index d88c142dd0a61100681cbc11f47bcc657f22d48e..b6a4f2091a45194251e5b7f3176fa7e852ce5c8f 100644 (file)
@@ -1,4 +1,5 @@
-/* Functions specific to running gdb native on HPPA running Linux.
+/* Functions specific to running GDB native on HPPA running GNU/Linux.
+
    Copyright 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include <sys/procfs.h>
 #include <sys/ptrace.h>
-#include <string.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43)
+#include <asm/offset.h>
+#else
 #include <asm/offsets.h>
+#endif
 
 #include "hppa-tdep.h"
 
@@ -215,7 +221,7 @@ fetch_register (int regno)
 
   if (CANNOT_FETCH_REGISTER (regno))
     {
-      supply_register (regno, NULL);
+      regcache_raw_supply (current_regcache, regno, NULL);
       return;
     }
 
@@ -305,7 +311,7 @@ supply_gregset (gdb_gregset_t *gregsetp)
   for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++)
     {
       int regno = greg_map[i];
-      supply_register (regno, regp);
+      regcache_raw_supply (current_regcache, regno, regp);
     }
 }
 
@@ -324,7 +330,7 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
 
       if (regno == -1 || regno == mregno)
        {
-          regcache_collect(mregno, &(*gregsetp)[i]);
+          regcache_raw_collect(current_regcache, mregno, &(*gregsetp)[i]);
        }
     }
 }
@@ -336,14 +342,15 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
 void
 supply_fpregset (gdb_fpregset_t *fpregsetp)
 {
-  register int regi;
+  int regi;
   char *from;
 
   for (regi = 0; regi <= 31; regi++)
     {
       from = (char *) &((*fpregsetp)[regi]);
-      supply_register (2*regi + HPPA_FP0_REGNUM, from);
-      supply_register (2*regi + HPPA_FP0_REGNUM + 1, from + 4);
+      regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM, from);
+      regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM + 1,
+                          from + 4);
     }
 }
 
@@ -364,6 +371,6 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
       char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
       if ((i - HPPA_FP0_REGNUM) & 1)
        to += 4;
-      regcache_collect (i, to);
+      regcache_raw_collect (current_regcache, i, to);
    }
 }
This page took 0.026093 seconds and 4 git commands to generate.