* target.c (target_get_osdata): Check for equal or higher than
authorPedro Alves <palves@redhat.com>
Fri, 6 Feb 2009 02:08:48 +0000 (02:08 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 6 Feb 2009 02:08:48 +0000 (02:08 +0000)
process_stratum, not dummy_stratum.

gdb/ChangeLog
gdb/target.c

index eded4cb02689a8f1fb5c635c1a2b6dfc7562a2d6..6038287874b1b5b7a0e21e9ae78f6be6adbe813f 100644 (file)
@@ -1,10 +1,15 @@
+2009-02-06  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.c (target_get_osdata): Check for equal or higher than
+       process_stratum, not dummy_stratum.
+
 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..
+       fallback to the default run target.
 
 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
 
index de33d114c16531022950f4a9802cfa72aed1b2bb..1752ddc703f9d8333ae8778abe0c70aa29e7cb89 100644 (file)
@@ -2218,10 +2218,13 @@ target_get_osdata (const char *type)
   char *document;
   struct target_ops *t;
 
-  if (current_target.to_stratum == dummy_stratum)
-    t = find_default_run_target ("get OS data");
-  else
+  /* If we're already connected to something that can get us OS
+     related data, use it.  Otherwise, try using the native
+     target.  */
+  if (current_target.to_stratum >= process_stratum)
     t = current_target.beneath;
+  else
+    t = find_default_run_target ("get OS data");
 
   if (!t)
     return NULL;