gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / tilegx-linux-nat.c
index a374d8bd2efe8e2f6c110da6185ae369762962b3..219693b966fd37d9b6c7254555c534d2151614ea 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux TILE-Gx.
 
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -88,7 +88,7 @@ supply_gregset (struct regcache* regcache,
 
   for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++)
     if (regmap[i] >= 0)
-      regcache_raw_supply (regcache, i, regp + regmap[i]);
+      regcache->raw_supply (i, regp + regmap[i]);
 }
 
 /* Fill registers in *GREGSETPS with the values in GDB's
@@ -103,7 +103,7 @@ fill_gregset (const struct regcache* regcache,
 
   for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++)
     if (regmap[i] >= 0)
-      regcache_raw_collect (regcache, i, regp + regmap[i]);
+      regcache->raw_collect (i, regp + regmap[i]);
 }
 
 /* Transfering floating-point registers between GDB, inferiors and cores.  */
@@ -137,7 +137,7 @@ tilegx_linux_nat_target::fetch_registers (struct regcache *regcache,
                                          int regnum)
 {
   elf_gregset_t regs;
-  pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
+  pid_t tid = get_ptrace_pid (regcache->ptid ());
 
   if (ptrace (PTRACE_GETREGS, tid, 0, (PTRACE_TYPE_ARG3) &regs) < 0)
     perror_with_name (_("Couldn't get registers"));
@@ -153,7 +153,7 @@ tilegx_linux_nat_target::store_registers (struct regcache *regcache,
                                          int regnum)
 {
   elf_gregset_t regs;
-  pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
+  pid_t tid = get_ptrace_pid (regcache->ptid ());
 
   if (ptrace (PTRACE_GETREGS, tid, 0, (PTRACE_TYPE_ARG3) &regs) < 0)
     perror_with_name (_("Couldn't get registers"));
@@ -164,9 +164,10 @@ tilegx_linux_nat_target::store_registers (struct regcache *regcache,
     perror_with_name (_("Couldn't write registers"));
 }
 
+void _initialize_tile_linux_nat ();
 void
-_initialize_tile_linux_nat (void)
+_initialize_tile_linux_nat ()
 {
   linux_target = &the_tilegx_linux_nat_target;
-  add_target (&the_tilegx_linux_nat_target);
+  add_inf_child_target (&the_tilegx_linux_nat_target);
 }
This page took 0.040482 seconds and 4 git commands to generate.