* remote.c (extended_remote_can_run): Delete.
authorPedro Alves <palves@redhat.com>
Fri, 6 Feb 2009 01:23:00 +0000 (01:23 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 6 Feb 2009 01:23:00 +0000 (01:23 +0000)
(init_remote_ops): Don't register it.
* target.c (target_get_osdata): Don't check for target_can_run.
Instead any target that has already been pushed, otherwise
fallback to the default run target..

gdb/ChangeLog
gdb/remote.c
gdb/target.c

index ac2419d3a50f896878b63a5dd6922556c8e4b1b0..eded4cb02689a8f1fb5c635c1a2b6dfc7562a2d6 100644 (file)
@@ -1,3 +1,11 @@
+2009-02-06  Pedro Alves  <pedro@codesourcery.com>
+
+       * remote.c (extended_remote_can_run): Delete.
+       (init_remote_ops): Don't register it.
+       * target.c (target_get_osdata): Don't check for target_can_run.
+       Instead any target that has already been pushed, otherwise
+       fallback to the default run target..
+
 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
 
        * target.c (target_create_inferior, target_detach)
index 4864dde3845c68ab6f5ebf5566983c6d97be573d..8cb37faf6245ee3c88d9b610b1c327023df9b691 100644 (file)
@@ -8674,15 +8674,6 @@ remote_supports_multi_process (void)
   return remote_multi_process_p (rs);
 }
 
-static int
-extended_remote_can_run (void)
-{
-  if (remote_desc != NULL)
-    return 1;
-
-  return 0;
-}
-
 static void
 init_remote_ops (void)
 {
@@ -8768,7 +8759,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   extended_remote_ops.to_detach = extended_remote_detach;
   extended_remote_ops.to_attach = extended_remote_attach;
   extended_remote_ops.to_kill = extended_remote_kill;
-  extended_remote_ops.to_can_run = extended_remote_can_run;
 }
 
 static int
index 875046f462ff5b3ad12489335e998dbbde473fc3..de33d114c16531022950f4a9802cfa72aed1b2bb 100644 (file)
@@ -2218,18 +2218,15 @@ target_get_osdata (const char *type)
   char *document;
   struct target_ops *t;
 
-  if (target_can_run (&current_target))
-    t = &current_target;
-  else
+  if (current_target.to_stratum == dummy_stratum)
     t = find_default_run_target ("get OS data");
+  else
+    t = current_target.beneath;
 
   if (!t)
     return NULL;
 
-  document = target_read_stralloc (t,
-                                  TARGET_OBJECT_OSDATA,
-                                  type);
-  return document;
+  return target_read_stralloc (t, TARGET_OBJECT_OSDATA, type);
 }
 
 static int