summaryrefslogtreecommitdiff
path: root/gdb/inferior.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-03-07 15:58:12 +0000
committerTom Tromey <tromey@redhat.com>2011-03-07 15:58:12 +0000
commitee34b00175d8e9ba4d2f5fd3c92e9759bb4458b9 (patch)
treeeb3250104695835cb0fa1755e1ace16e2fd4fda2 /gdb/inferior.c
parent528e3f0dd8575f77fd686822ca9762a68b792da6 (diff)
downloadgdb-ee34b00175d8e9ba4d2f5fd3c92e9759bb4458b9.tar.gz
* target.h (struct target_ops) <to_has_execution>: Add ptid_t
parameter. (target_has_execution_1): Update. (target_has_execution_current): Declare. (target_has_execution): Call target_has_execution_current. (default_child_has_execution): Update. * target.c (default_child_has_execution): Add 'the_ptid' parameter. (target_has_execution_1): Likewise. (target_has_execution_current): New function. (add_target): Update. (init_dummy_target): Update. * remote-m32r-sdi.c (m32r_has_execution): New function. (init_m32r_ops): Use it. * record.c (record_core_has_execution): Now static. Add 'the_ptid' parameter. * inferior.c (have_live_inferiors): Don't save current thread. Use target_has_execution_1.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r--gdb/inferior.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 76f81c36b0f..eb33b9a3766 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -462,28 +462,18 @@ have_inferiors (void)
int
have_live_inferiors (void)
{
- struct cleanup *old_chain;
struct inferior *inf;
- old_chain = make_cleanup_restore_current_thread ();
-
for (inf = inferior_list; inf; inf = inf->next)
if (inf->pid != 0)
{
struct thread_info *tp;
tp = any_thread_of_process (inf->pid);
- if (tp)
- {
- switch_to_thread (tp->ptid);
-
- if (target_has_execution)
- break;
- }
+ if (tp && target_has_execution_1 (tp->ptid))
+ break;
}
- do_cleanups (old_chain);
-
return inf != NULL;
}