From patchwork Sat Jan 4 18:34:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37185 Received: (qmail 969 invoked by alias); 4 Jan 2020 18:34:27 -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 597 invoked by uid 89); 4 Jan 2020 18:34:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=hack X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Jan 2020 18:34:18 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 343CAD1EE6 for ; Sat, 4 Jan 2020 12:34:17 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id noFdiWgEQW4frnoFdinK2K; Sat, 04 Jan 2020 12:34:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BWYouxlzmprAmKIEBZ/Qh67jsbBTpn60quy5VUclkkI=; b=ipMobSmYucnGrZRZ/ba0x7jBwX ILGpZgDzkNS1uqQobs6s8BhfvKr2olbYupq+BRdLbjxY6SF7jiDUvyTzOdjiSlUelTUNVlwHqRq/q 1+am8XhLAYgJKU50cMtIt+X2A; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:48942 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1inoFd-0026Lh-1J; Sat, 04 Jan 2020 11:34:17 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 19/24] Remove the TUI annotation hack Date: Sat, 4 Jan 2020 11:34:05 -0700 Message-Id: <20200104183410.17114-20-tom@tromey.com> In-Reply-To: <20200104183410.17114-1-tom@tromey.com> References: <20200104183410.17114-1-tom@tromey.com> do_tui_putc has some code to remove annotations from gdb output. This was added in 2001, see commit a198b876bbcb. However, I think this code is not needed. It seems very unlikely to enable both annotations and the TUI, and in any case I think this is something that should not be supported. So, this patch removes this code. 2020-01-04 Tom Tromey * tui/tui-io.c (do_tui_putc): Don't omit annotations. Change-Id: I05728110365a362d37c9821df9c8779316100bb8 --- gdb/ChangeLog | 4 ++++ gdb/tui/tui-io.c | 36 +++++++++++------------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 9cb41104fe9..7f23ef9daf1 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -138,35 +138,21 @@ static int tui_readline_pipe[2]; static void do_tui_putc (WINDOW *w, char c) { - static int tui_skip_line = -1; - - /* Catch annotation and discard them. We need two \032 and discard - until a \n is seen. */ - if (c == '\032') - { - tui_skip_line++; - } - else if (tui_skip_line != 1) + /* Expand TABs, since ncurses on MS-Windows doesn't. */ + if (c == '\t') { - tui_skip_line = -1; - /* Expand TABs, since ncurses on MS-Windows doesn't. */ - if (c == '\t') - { - int col; + int col; - col = getcurx (w); - do - { - waddch (w, ' '); - col++; - } - while ((col % 8) != 0); + col = getcurx (w); + do + { + waddch (w, ' '); + col++; } - else - waddch (w, c); + while ((col % 8) != 0); } - else if (c == '\n') - tui_skip_line = -1; + else + waddch (w, c); } /* Update the cached value of the command window's start line based on