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.
This commit is contained in:
Pedro Alves 2020-07-04 19:12:30 +01:00 committed by Pedro Alves
parent 96118d114e
commit 43667cc6f6
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2020-07-10 Pedro Alves <pedro@palves.net>
PR gdb/26199
* target.c (target_pass_ctrlc): Look at the inferior's non-exited
threads, not all threads.
2020-07-10 Pedro Alves <pedro@palves.net>
PR gdb/26199

View file

@ -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. */