From patchwork Thu Oct 26 18:55:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23867 Received: (qmail 66477 invoked by alias); 26 Oct 2017 18:55:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 66456 invoked by uid 89); 26 Oct 2017 18:55:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Oct 2017 18:55:09 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FD48C05689D for ; Thu, 26 Oct 2017 18:55:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1FD48C05689D Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id A08E41758F for ; Thu, 26 Oct 2017 18:55:07 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Garbage collect remote.c:remote_async_terminal_ours_p Date: Thu, 26 Oct 2017 19:55:06 +0100 Message-Id: <1509044106-28055-1-git-send-email-palves@redhat.com> 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