]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix latent bug in target_pass_ctrlc
authorPedro Alves <pedro@palves.net>
Sat, 4 Jul 2020 18:12:30 +0000 (19:12 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 6 Jul 2020 18:57:20 +0000 (19:57 +0100)
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

index f4e4f05b5fac4bb2f9eae881d6fe65c2f6604f58..cd66675e8a41f52da1e9ea759299e643930e214b 100644 (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.  */