]> 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>
Fri, 10 Jul 2020 22:48:19 +0000 (23:48 +0100)
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
gdb/target.c

index b90e45581d33022f8f9348198e56a7ceecf9fbe5..679f2d25182c776602b9f33b81210c4cefbf8de4 100644 (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
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.  */