From: Pedro Alves Date: Sat, 4 Jul 2020 18:12:30 +0000 (+0100) Subject: Fix latent bug in target_pass_ctrlc X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce502e47c0b5333703dfa4b6d1268ca65a0b2926;p=thirdparty%2Fbinutils-gdb.git 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. --- 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. */