From 739ef7fb25dd43d0560463c7744adbc3f90f73ea Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 6 Feb 2009 02:08:48 +0000 Subject: [PATCH] * target.c (target_get_osdata): Check for equal or higher than process_stratum, not dummy_stratum. --- gdb/ChangeLog | 7 ++++++- gdb/target.c | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eded4cb0268..6038287874b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,10 +1,15 @@ +2009-02-06 Pedro Alves + + * target.c (target_get_osdata): Check for equal or higher than + process_stratum, not dummy_stratum. + 2009-02-06 Pedro Alves * 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 diff --git a/gdb/target.c b/gdb/target.c index de33d114c16..1752ddc703f 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; -- 2.30.2