diff options
author | Pedro Alves <palves@redhat.com> | 2009-02-06 01:23:00 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-02-06 01:23:00 +0000 |
commit | 6d097e655a5687059556804d993e03ac4eaff7d8 (patch) | |
tree | 945899c5428032bf89252c207fc067bdc6e759da | |
parent | 947b8855e441f5b8616b7c1861e663a4056d2e49 (diff) | |
download | gdb-6d097e655a5687059556804d993e03ac4eaff7d8.zip gdb-6d097e655a5687059556804d993e03ac4eaff7d8.tar.gz gdb-6d097e655a5687059556804d993e03ac4eaff7d8.tar.bz2 |
* 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..
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/remote.c | 10 | ||||
-rw-r--r-- | gdb/target.c | 11 |
3 files changed, 12 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ac2419d..eded4cb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 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) (target_mourn_inferior, target_attach, target_close): Do target debug output. diff --git a/gdb/remote.c b/gdb/remote.c index 4864dde..8cb37fa 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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 diff --git a/gdb/target.c b/gdb/target.c index 875046f..de33d11 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2218,18 +2218,15 @@ target_get_osdata (const char *type) char *document; struct target_ops *t; - if (target_can_run (¤t_target)) - t = ¤t_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 |