aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/infrun.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 45c1b4a..6dc0a2b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5895,7 +5895,14 @@ handle_thread_exited (execution_control_state *ecs)
if (abort_cmd)
{
+ /* We're stopping for the thread exit event. Switch to the
+ event thread again, as finish_step_over may have switched
+ threads. */
+ switch_to_thread (ecs->event_thread);
+
+ /* Emit [Thread ... exited] notification. */
delete_thread (ecs->event_thread);
+
ecs->event_thread = nullptr;
return false;
}