diff options
author | Pedro Alves <pedro@palves.net> | 2020-07-04 19:12:30 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2020-07-10 23:48:19 +0100 |
commit | 43667cc6f65e60e2c15f3bb84e45730b537db5fa (patch) | |
tree | e301f7e3884af9c20cb0e5bc44cff2b872763277 /gdb | |
parent | 96118d114e3c53aadaf3fe5b5cf94979dbf56d87 (diff) | |
download | fsf-binutils-gdb-43667cc6f65e60e2c15f3bb84e45730b537db5fa.zip fsf-binutils-gdb-43667cc6f65e60e2c15f3bb84e45730b537db5fa.tar.gz fsf-binutils-gdb-43667cc6f65e60e2c15f3bb84e45730b537db5fa.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/target.c | 2 |
2 files changed, 7 insertions, 1 deletions
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 <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 * 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. */ |