diff options
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 14 |
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; } |