From 43667cc6f65e60e2c15f3bb84e45730b537db5fa Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sat, 4 Jul 2020 19:12:30 +0100 Subject: 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. --- gdb/ChangeLog | 6 ++++++ gdb/target.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b90e455..679f2d2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,12 @@ 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 * remote.c (remote_target::open_1): Pass remote target pointer as data to create_async_event_handler. (remote_async_inferior_event_handler): Mark async event handler diff --git a/gdb/target.c b/gdb/target.c index f4e4f05..cd66675 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. */ -- cgit v1.1