From patchwork Wed Oct 2 23:12:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34805 Received: (qmail 38777 invoked by alias); 2 Oct 2019 23:12: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 38727 invoked by uid 89); 2 Oct 2019 23:12:10 -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= X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Oct 2019 23:12:09 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway32.websitewelcome.com (Postfix) with ESMTP id A298A60ACD for ; Wed, 2 Oct 2019 18:12:07 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id FnmxiltJTVUVYFnmxiYmE3; Wed, 02 Oct 2019 18:12:07 -0500 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=z/91y1G6LtVcCXG4p2GXP001enzOWg4Nec4BDe1TBPg=; b=IkHDIC4QuGWH2DtimL5c6BObk1 HcujABfbM68i2TDh+j6K2HlUKB3+E4BMrzBXFKUhxq2Wb17mlu9FBb61XeuKCipejYuFF6kyA9+/e TzyGiPGTITfcPTOewH/gHSsSQ; Received: from 75-166-72-156.hlrn.qwest.net ([75.166.72.156]:42570 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iFnmx-003VLt-EH; Wed, 02 Oct 2019 17:12:07 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 6/6] Don't call erase_data_content from tui_data_window::show_registers Date: Wed, 2 Oct 2019 17:12:02 -0600 Message-Id: <20191002231202.10940-7-tom@tromey.com> In-Reply-To: <20191002231202.10940-1-tom@tromey.com> References: <20191002231202.10940-1-tom@tromey.com> tui_data_window::show_registers currently calls erase_data_content. However, I think it's better to have fewer calls to this (ideally just one would suffice). This refactors that function to remove this call. gdb/ChangeLog 2019-10-02 Tom Tromey * tui/tui-regs.c (tui_data_window::show_registers): Don't call erase_data_content. --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-regs.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 474b62e2047..1d936f712b6 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -154,13 +154,14 @@ tui_data_window::show_registers (struct reggroup *group) for (auto &&data_item_win : m_regs_content) data_item_win.highlight = false; m_current_group = group; - rerender (); } else { m_current_group = 0; - erase_data_content (_("[ Register Values Unavailable ]")); + m_regs_content.clear (); } + + rerender (); }