Fix PR 20345 - call_function_by_hand_dummy: Assertion `tp->thread_fsm == &sm->thread_...
authorPedro Alves <palves@redhat.com>
Wed, 28 Sep 2016 21:44:57 +0000 (17:44 -0400)
committerPedro Alves <palves@redhat.com>
Wed, 28 Sep 2016 21:44:57 +0000 (17:44 -0400)
commit6d61dee599fb314f0561c3bd0dd17ac0cfa05e35
tree88c7f9ed27d42ada701666b52f364cd7af7e4058
parent4435e1cc6214e6ef44bd90fcde8ae2de9d8be418
Fix PR 20345 - call_function_by_hand_dummy: Assertion `tp->thread_fsm == &sm->thread_fsm' failed

If you run an infcall from the command line, and immediately after run
some other command, GDB incorrectly processes the other command before
the infcall finishes.

The problem is that the fix for PR gdb/20418 (Problems with
synchronous commands and new-ui, git 3eb7562a983b) moved the
add_file_handler/delete_file_handler calls out of
target_terminal_$foo, and missed adjusting the infcall code.

gdb/ChangeLog:
2016-09-28  Pedro Alves  <palves@redhat.com>

* infcall.c (run_inferior_call): Remove input from the event
loop while running the infcall.

gdb/testsuite/ChangeLog:
2016-09-28  Pedro Alves  <palves@redhat.com>

* gdb.base/infcall-input.c: New file.
* gdb.base/infcall-input.exp: New file.
gdb/ChangeLog
gdb/infcall.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/infcall-input.c [new file with mode: 0644]
gdb/testsuite/gdb.base/infcall-input.exp [new file with mode: 0644]
This page took 0.029481 seconds and 4 git commands to generate.