From: Pedro Alves Date: Sat, 4 Jul 2020 18:12:30 +0000 (+0100) Subject: Fix latent bug in target_pass_ctrlc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43667cc6f65e60e2c15f3bb84e45730b537db5fa;p=binutils-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): Look at the inferior's non-exited threads, not all threads. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b90e45581d3..679f2d25182 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-07-10 Pedro Alves + + PR gdb/26199 + * target.c (target_pass_ctrlc): Look at the inferior's non-exited + threads, not all threads. + 2020-07-10 Pedro Alves PR gdb/26199 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. */