Remove regcache_register_status
[binutils-gdb.git] / gdb / i386-gnu-nat.c
index de7d62a26991ea18412e904cda4d2ed1391c9b63..a738308e51b96f66410574f384d7eba52f8402bd 100644 (file)
@@ -108,7 +108,7 @@ gnu_fetch_registers (struct target_ops *ops,
                     struct regcache *regcache, int regno)
 {
   struct proc *thread;
-  ptid_t ptid = regcache_get_ptid (regcache);
+  ptid_t ptid = regcache->ptid ();
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
@@ -201,7 +201,7 @@ gnu_store_registers (struct target_ops *ops,
 {
   struct proc *thread;
   struct gdbarch *gdbarch = regcache->arch ();
-  ptid_t ptid = regcache_get_ptid (regcache);
+  ptid_t ptid = regcache->ptid ();
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
@@ -265,7 +265,7 @@ gnu_store_registers (struct target_ops *ops,
          proc_debug (thread, "storing all registers");
 
          for (i = 0; i < I386_NUM_GREGS; i++)
-           if (REG_VALID == regcache_register_status (regcache, i))
+           if (REG_VALID == regcache->get_register_status (i))
              regcache_raw_collect (regcache, i, REG_ADDR (state, i));
        }
       else
@@ -273,7 +273,7 @@ gnu_store_registers (struct target_ops *ops,
          proc_debug (thread, "storing register %s",
                      gdbarch_register_name (gdbarch, regno));
 
-         gdb_assert (REG_VALID == regcache_register_status (regcache, regno));
+         gdb_assert (REG_VALID == regcache->get_register_status (regno));
          regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
        }
 
@@ -440,5 +440,5 @@ _initialize_i386gnu_nat (void)
 #endif /* i386_DEBUG_STATE */
 
   /* Register the target.  */
-  add_target (&the_i386_gnu_nat_target);
+  add_inf_child_target (&the_i386_gnu_nat_target);
 }