convert to_core_of_thread
[deliverable/binutils-gdb.git] / gdb / target.c
index d96f706a9676979788dda4b6934e719c40a795ba..5f86c4ef1973f654aa0a4591cab4da899296a4f0 100644 (file)
@@ -3711,23 +3711,13 @@ target_store_registers (struct regcache *regcache, int regno)
 int
 target_core_of_thread (ptid_t ptid)
 {
-  struct target_ops *t;
-
-  for (t = current_target.beneath; t != NULL; t = t->beneath)
-    {
-      if (t->to_core_of_thread != NULL)
-       {
-         int retval = t->to_core_of_thread (t, ptid);
-
-         if (targetdebug)
-           fprintf_unfiltered (gdb_stdlog,
-                               "target_core_of_thread (%d) = %d\n",
-                               ptid_get_pid (ptid), retval);
-         return retval;
-       }
-    }
+  int retval = current_target.to_core_of_thread (&current_target, ptid);
 
-  return -1;
+  if (targetdebug)
+    fprintf_unfiltered (gdb_stdlog,
+                       "target_core_of_thread (%d) = %d\n",
+                       ptid_get_pid (ptid), retval);
+  return retval;
 }
 
 int
This page took 0.026304 seconds and 4 git commands to generate.