X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Finfrun.c;fp=gdb%2Finfrun.c;h=0f2f45a4d2d7773fcc2566a2ad537c2d97a3d025;hb=2ec0f7ffc6f644100b432352e90ce0e4e71d81e3;hp=a01e0969cb17943708ecb64f13f165bcea9d7b29;hpb=0e2dba2d6d367b23ec744b95f2189482f4e4b188;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/infrun.c b/gdb/infrun.c index a01e0969cb..0f2f45a4d2 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5068,16 +5068,28 @@ handle_no_resumed (struct execution_control_state *ecs) have resumed threads _now_. In the example above, this removes thread 3 from the thread list. If thread 2 was re-resumed, we ignore this event. If we find no thread resumed, then we cancel - the synchronous command show "no unwaited-for " to the user. */ - update_thread_list (); + the synchronous command and show "no unwaited-for " to the + user. */ + + { + scoped_restore_current_thread restore_thread; + + for (auto *target : all_non_exited_process_targets ()) + { + switch_to_target_no_thread (target); + update_thread_list (); + } + } - for (thread_info *thread : all_non_exited_threads (ecs->target)) + for (thread_info *thread : all_non_exited_threads ()) { if (thread->executing || thread->suspend.waitstatus_pending_p) { - /* There were no unwaited-for children left in the target at - some point, but there are now. Just ignore. */ + /* Either there were no unwaited-for children left in the + target at some point, but there are now, or some target + other than the eventing one has unwaited-for children + left. Just ignore. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_RESUMED "