From ce502e47c0b5333703dfa4b6d1268ca65a0b2926 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sat, 4 Jul 2020 19:12:30 +0100 Subject: [PATCH] Fix latent bug in target_pass_ctrlc We were checking the thr->executing of an exited thread. gdb/ChangeLog: PR gdb/26199 * target.c (target_pass_ctrlc): Looking at the inferiors non-exited threads, not all threads. --- gdb/target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/target.c b/gdb/target.c index f4e4f05b5fa..cd66675e8a4 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3274,7 +3274,7 @@ target_pass_ctrlc (void) if (proc_target == NULL) continue; - for (thread_info *thr : inf->threads ()) + for (thread_info *thr : inf->non_exited_threads ()) { /* A thread can be THREAD_STOPPED and executing, while running an infcall. */ -- 2.47.2