gdb: include gdbsupport/buildargv.h in ser-mingw.c
[binutils-gdb.git] / gdb / m32r-linux-nat.c
index e156df38b551924c9ef81b184b0ecdca4a212240..502020dd1e03322ac28014799aa5682445b48493 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux m32r.
 
-   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -101,11 +101,11 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t * gregsetp)
        }
 
       if (i != M32R_SP_REGNUM)
-       regcache_raw_supply (regcache, i, &regval);
+       regcache->raw_supply (i, &regval);
       else if (psw & 0x8000)
-       regcache_raw_supply (regcache, i, regp + SPU_REGMAP);
+       regcache->raw_supply (i, regp + SPU_REGMAP);
       else
-       regcache_raw_supply (regcache, i, regp + SPI_REGMAP);
+       regcache->raw_supply (i, regp + SPI_REGMAP);
     }
 }
 
@@ -150,11 +150,11 @@ fill_gregset (const struct regcache *regcache,
        continue;
 
       if (i != M32R_SP_REGNUM)
-       regcache_raw_collect (regcache, i, regp + regmap[i]);
+       regcache->raw_collect (i, regp + regmap[i]);
       else if (psw & 0x8000)
-       regcache_raw_collect (regcache, i, regp + SPU_REGMAP);
+       regcache->raw_collect (i, regp + SPU_REGMAP);
       else
-       regcache_raw_collect (regcache, i, regp + SPI_REGMAP);
+       regcache->raw_collect (i, regp + SPI_REGMAP);
     }
 }
 
@@ -202,7 +202,7 @@ fill_fpregset (const struct regcache *regcache,
 void
 m32r_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
 {
-  pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
+  pid_t tid = get_ptrace_pid (regcache->ptid ());
 
   /* Use the PTRACE_GETREGS request whenever possible, since it
      transfers more registers in one system call, and we'll cache the
@@ -223,7 +223,7 @@ m32r_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
 void
 m32r_linux_nat_target::store_registers (struct regcache *regcache, int regno)
 {
-  pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
+  pid_t tid = get_ptrace_pid (regcache->ptid ());
 
   /* Use the PTRACE_SETREGS request whenever possible, since it
      transfers more registers in one system call.  */
@@ -237,10 +237,11 @@ m32r_linux_nat_target::store_registers (struct regcache *regcache, int regno)
                  _("Got request to store bad register number %d."), regno);
 }
 
+void _initialize_m32r_linux_nat ();
 void
-_initialize_m32r_linux_nat (void)
+_initialize_m32r_linux_nat ()
 {
   /* Register the target.  */
   linux_target = &the_m32r_linux_nat_target;
-  add_target (&the_m32r_linux_nat_target);
+  add_inf_child_target (&the_m32r_linux_nat_target);
 }