Remove ui_register_input_event_handler

This patch removes ui_register_input_event_handler and
ui_unregister_input_event_handler, replacing them with methods on
'ui'.  It also changes gdb to use these methods everywhere, rather
than sometimes reaching in to the ui to manage the file descriptor
directly.
This commit is contained in:
Tom Tromey
2022-06-23 11:05:39 -06:00
parent bbcab3366b
commit 8f7f9b3a91
5 changed files with 22 additions and 22 deletions

View File

@@ -581,7 +581,7 @@ run_inferior_call (std::unique_ptr<call_thread_fsm> sm,
ptid_t call_thread_ptid = call_thread->ptid;
int was_running = call_thread->state == THREAD_RUNNING;
delete_file_handler (current_ui->input_fd);
current_ui->unregister_file_handler ();
scoped_restore restore_in_infcall
= make_scoped_restore (&call_thread->control.in_infcall, 1);
@@ -624,9 +624,9 @@ run_inferior_call (std::unique_ptr<call_thread_fsm> sm,
state again here. In other cases, stdin will be re-enabled by
inferior_event_handler, when an exception is thrown. */
if (current_ui->prompt_state == PROMPT_BLOCKED)
delete_file_handler (current_ui->input_fd);
current_ui->unregister_file_handler ();
else
ui_register_input_event_handler (current_ui);
current_ui->register_file_handler ();
/* If the infcall does NOT succeed, normal_stop will have already
finished the thread states. However, on success, normal_stop