From 23cc4e1b28d445e23827a09c454aa806f2b8c720 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 26 Oct 2017 19:53:03 +0100 Subject: [PATCH] Garbage collect remote.c:remote_async_terminal_ours_p remote.c:remote_async_terminal_ours_p stopped being useful after 048094accce2 ("target remote: Don't rely on immediate_quit (introduce quit handlers)") and commit 41fd2b0f5d95 ("Make input_fd be per UI"), which turned remote's terminal_inferior/ours methods into nops. gdb/ChangeLog: 2017-10-26 Pedro Alves * remote.c (remote_async_terminal_ours_p): Delete. (remote_open_1, remote_terminal_inferior, remote_terminal_ours): Remove references to 'remote_async_terminal_ours_p'. --- gdb/ChangeLog | 6 ++++++ gdb/remote.c | 21 --------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f180b1d..caa6484 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-10-26 Pedro Alves + + * remote.c (remote_async_terminal_ours_p): Delete. + (remote_open_1, remote_terminal_inferior, remote_terminal_ours): + Remove references to 'remote_async_terminal_ours_p'. + 2017-10-26 Yao Qi * breakpoint.h (regular_breakpoint_inserted_here_p): Remove. diff --git a/gdb/remote.c b/gdb/remote.c index 217c571..ed2a9ec 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1007,11 +1007,6 @@ show_remotebreak (struct ui_file *file, int from_tty, static unsigned int remote_address_size; -/* Temporary to track who currently owns the terminal. See - remote_terminal_* for more details. */ - -static int remote_async_terminal_ours_p; - /* User configurable variables for the number of characters in a memory read/write packet. MIN (rsa->remote_packet_size, @@ -5117,9 +5112,6 @@ remote_open_1 (const char *name, int from_tty, readahead_cache_invalidate (); - /* Start out by owning the terminal. */ - remote_async_terminal_ours_p = 1; - if (target_async_permitted) { /* FIXME: cagney/1999-09-23: During the initial connection it is @@ -6303,15 +6295,6 @@ interrupt_query (void) static void remote_terminal_inferior (struct target_ops *self) { - /* FIXME: cagney/1999-09-27: Make calls to target_terminal::*() - idempotent. The event-loop GDB talking to an asynchronous target - with a synchronous command calls this function from both - event-top.c and infrun.c/infcmd.c. Once GDB stops trying to - transfer the terminal to the target when it shouldn't this guard - can go away. */ - if (!remote_async_terminal_ours_p) - return; - remote_async_terminal_ours_p = 0; /* NOTE: At this point we could also register our selves as the recipient of all input. Any characters typed could then be passed on down to the target. */ @@ -6320,10 +6303,6 @@ remote_terminal_inferior (struct target_ops *self) static void remote_terminal_ours (struct target_ops *self) { - /* See FIXME in remote_terminal_inferior. */ - if (remote_async_terminal_ours_p) - return; - remote_async_terminal_ours_p = 1; } static void -- 2.7.4