diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index a669423..a59cbe6 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3971,6 +3971,16 @@ prepare_for_detach (void) } } +/* If all-stop, but there exists a non-stop target, stop all threads + now that we're presenting the stop to the user. */ + +static void +stop_all_threads_if_all_stop_mode () +{ + if (!non_stop && exists_non_stop_target ()) + stop_all_threads ("presenting stop to user in all-stop"); +} + /* Wait for control to return from inferior to debugger. If inferior gets a signal, we may decide to start it up again @@ -4017,6 +4027,8 @@ wait_for_inferior (inferior *inf) break; } + stop_all_threads_if_all_stop_mode (); + /* No error, don't finish the state yet. */ finish_state.release (); } @@ -4240,6 +4252,8 @@ fetch_inferior_event () bool should_notify_stop = true; int proceeded = 0; + stop_all_threads_if_all_stop_mode (); + clean_up_just_stopped_threads_fsms (ecs); if (thr != nullptr && thr->thread_fsm () != nullptr) @@ -8138,11 +8152,6 @@ stop_waiting (struct execution_control_state *ecs) /* Let callers know we don't want to wait for the inferior anymore. */ ecs->wait_some_more = 0; - - /* If all-stop, but there exists a non-stop target, stop all - threads now that we're presenting the stop to the user. */ - if (!non_stop && exists_non_stop_target ()) - stop_all_threads ("presenting stop to user in all-stop"); } /* Like keep_going, but passes the signal to the inferior, even if the |