aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-02-06 02:08:48 +0000
committerPedro Alves <palves@redhat.com>2009-02-06 02:08:48 +0000
commit739ef7fb25dd43d0560463c7744adbc3f90f73ea (patch)
tree3a3b6e9cb2d49835ce4b8f7946cd35cfda126d47 /gdb/target.c
parent80890a619b855d6e124be63b31aae7201df994e3 (diff)
downloadgdb-739ef7fb25dd43d0560463c7744adbc3f90f73ea.zip
gdb-739ef7fb25dd43d0560463c7744adbc3f90f73ea.tar.gz
gdb-739ef7fb25dd43d0560463c7744adbc3f90f73ea.tar.bz2
* target.c (target_get_osdata): Check for equal or higher than
process_stratum, not dummy_stratum.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/target.c b/gdb/target.c
index de33d11..1752ddc 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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;