Change regcache list to be an hash map
[deliverable/binutils-gdb.git] / gdb / m68k-linux-nat.c
index 2dbf85735ba800433391583102c01c4f842b96ee..5e9170d9de72d3c63df9dceca34967f6ce17ba06 100644 (file)
@@ -1,6 +1,6 @@
 /* Motorola m68k native support for GNU/Linux.
 
-   Copyright (C) 1996-2018 Free Software Foundation, Inc.
+   Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 #include "regcache.h"
 #include "target.h"
 #include "linux-nat.h"
+#include "gdbarch.h"
 
 #include "m68k-tdep.h"
 
@@ -172,7 +173,7 @@ store_register (const struct regcache *regcache, int regno)
   regaddr = 4 * regmap[regno];
 
   /* Put the contents of regno into a local buffer.  */
-  regcache_raw_collect (regcache, regno, buf);
+  regcache->raw_collect (regno, buf);
 
   /* Store the local buffer into the inferior a chunk at the time.  */
   for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
@@ -241,7 +242,7 @@ fill_gregset (const struct regcache *regcache,
 
   for (i = 0; i < NUM_GREGS; i++)
     if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i, regp + regmap[i]);
+      regcache->raw_collect (i, regp + regmap[i]);
 }
 
 #ifdef HAVE_PTRACE_GETREGS
@@ -338,15 +339,13 @@ fill_fpregset (const struct regcache *regcache,
   for (i = gdbarch_fp0_regnum (gdbarch);
        i < gdbarch_fp0_regnum (gdbarch) + 8; i++)
     if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i,
-                           FPREG_ADDR (fpregsetp,
-                                       i - gdbarch_fp0_regnum (gdbarch)));
+      regcache->raw_collect
+       (i, FPREG_ADDR (fpregsetp, i - gdbarch_fp0_regnum (gdbarch)));
 
   /* Fill in the floating-point control registers.  */
   for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
     if (regno == -1 || regno == i)
-      regcache_raw_collect (regcache, i,
-                           &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+      regcache->raw_collect (i, &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
 }
 
 #ifdef HAVE_PTRACE_GETREGS
@@ -512,8 +511,9 @@ ps_get_thread_area (struct ps_prochandle *ph,
   return PS_OK;
 }
 
+void _initialize_m68k_linux_nat ();
 void
-_initialize_m68k_linux_nat (void)
+_initialize_m68k_linux_nat ()
 {
   /* Register the target.  */
   linux_target = &the_m68k_linux_nat_target;
This page took 0.027913 seconds and 4 git commands to generate.