aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-script.h
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2020-07-04 19:31:21 +0100
committerPedro Alves <palves@redhat.com>2020-07-10 23:49:34 +0100
commit42bd97a6b1e5fa845af116ce52af1a8a3a58be7c (patch)
tree5a37f0776f61dd71d9165418a063e92d47cea1a8 /gdb/cli/cli-script.h
parent43667cc6f65e60e2c15f3bb84e45730b537db5fa (diff)
downloadgdb-42bd97a6b1e5fa845af116ce52af1a8a3a58be7c.zip
gdb-42bd97a6b1e5fa845af116ce52af1a8a3a58be7c.tar.gz
gdb-42bd97a6b1e5fa845af116ce52af1a8a3a58be7c.tar.bz2
Avoid constant stream of TARGET_WAITKIND_NO_RESUMED
If we hit the synchronous execution command case described by handle_no_resumed, and handle_no_resumed determines that the event should be ignored, because it found a thread that is executing, we end up in prepare_to_wait. There, if the current target is not registered in the event loop right now, we call mark_infrun_async_event_handler. With that event handler marked, the event loop calls again into fetch_inferior_event, which calls target_wait, which returns TARGET_WAITKIND_NO_RESUMED, and we end up in handle_no_resumed, again ignoring the event and marking infrun_async_event_handler. The result is that GDB is now always keeping the CPU 100% busy in this loop, even though it continues to be able to react to input and to real target events, because we still go through the event-loop. The problem is that marking of the infrun_async_event_handler in prepare_to_wait. That is there to handle targets that don't support asynchronous execution. So the correct predicate is whether async execution is supported, not whether the target is async right now. gdb/ChangeLog: PR gdb/26199 * infrun.c (prepare_to_wait): Check target_can_async_p instead of target_is_async_p.
Diffstat (limited to 'gdb/cli/cli-script.h')
0 files changed, 0 insertions, 0 deletions