summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-09-21 20:17:00 +0100
committerPedro Alves <palves@redhat.com>2016-09-21 20:17:00 +0100
commitaa9211fc0131012962eb5b3a459a3596d46dd1e8 (patch)
treeb00c0ea6664a9a819e9e538d1e583ff51940f533
parent31da3f27d765612d3f067467ad39e386da7bacd7 (diff)
downloadbinutils-gdb-users/palves/mjw-valgrind.tar.gz
Fix mjw's gdb/valgrind bugusers/palves/mjw-valgrind
-rw-r--r--gdb/infcall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 3c33c11d6a3..ab7426d6f3c 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -584,6 +584,8 @@ run_inferior_call (struct call_thread_fsm *sm,
fetch_inferior_event. */
current_ui->async = 0;
+ delete_file_handler (current_ui->input_fd);
+
call_thread->control.in_infcall = 1;
clear_proceed_status (0);
@@ -617,6 +619,10 @@ run_inferior_call (struct call_thread_fsm *sm,
state again here. In other cases, stdin will be re-enabled by
inferior_event_handler, when an exception is thrown. */
current_ui->prompt_state = saved_prompt_state;
+ if (current_ui->prompt_state == PROMPT_BLOCKED)
+ delete_file_handler (current_ui->input_fd);
+ else
+ ui_register_input_event_handler (current_ui);
current_ui->async = saved_ui_async;
/* At this point the current thread may have changed. Refresh