From patchwork Tue Sep 10 19:08:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34470 Received: (qmail 24793 invoked by alias); 10 Sep 2019 19:09:03 -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 24763 invoked by uid 89); 10 Sep 2019 19:09:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.2 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: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.4) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2019 19:09:01 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 2C0EC11C86 for ; Tue, 10 Sep 2019 14:09:00 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 7lVbiZd1i2PzO7lVciTl9K; Tue, 10 Sep 2019 14:09:00 -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=uiAmof3swaKxazYNgH1/Ec9GJy2H20aonxHtdgJE6lA=; b=KOMxolTYVqVyLOZ3Qy0hpEjnUp 6IwxEwcU6hrW22vP5kebAIaDIsbfEMqG8l2SQldduPacCulpIlPhcg8Gp68HnyY3DgFUUcL02kPvY yX3QZv+lmGadHRUzdzoxYo6mN; Received: from 71-218-73-27.hlrn.qwest.net ([71.218.73.27]:51786 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i7lVb-000EYF-LE; Tue, 10 Sep 2019 14:08:59 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 01/20] Remove tui_clear_source_windows_detail Date: Tue, 10 Sep 2019 13:08:38 -0600 Message-Id: <20190910190857.6562-2-tom@tromey.com> In-Reply-To: <20190910190857.6562-1-tom@tromey.com> References: <20190910190857.6562-1-tom@tromey.com> The calls to tui_clear_source_windows_detail in tui_add_win_to_layout aren't needed, because (after the resize unification) resizing will update the window contents. Removing these calls lets us remove several other things as well. gdb/ChangeLog 2019-09-10 Tom Tromey * tui/tui-data.h (tui_clear_source_windows_detail): Don't declare. * tui/tui-layout.c (tui_add_win_to_layout): Don't call tui_clear_source_windows_detail. * tui/tui-winsource.h (struct tui_source_window_base) : Don't declare. * tui/tui-winsource.c (tui_source_window_base::clear_detail): Remove. * tui/tui-data.c (tui_clear_source_windows_detail): Remove. --- gdb/ChangeLog | 12 ++++++++++++ gdb/tui/tui-data.c | 9 --------- gdb/tui/tui-data.h | 1 - gdb/tui/tui-layout.c | 2 -- gdb/tui/tui-winsource.c | 11 ----------- gdb/tui/tui-winsource.h | 2 -- 6 files changed, 12 insertions(+), 25 deletions(-) diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index c11aa43340c..833ea49a951 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -87,15 +87,6 @@ tui_set_win_with_focus (struct tui_win_info *win_info) } -/* Clear the pertinent detail in the source windows. */ -void -tui_clear_source_windows_detail () -{ - for (tui_source_window_base *win : tui_source_windows ()) - win->clear_detail (); -} - - /* Accessor for the term_height. */ int tui_term_height (void) diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 23f769f6ba5..be819503cf2 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -295,7 +295,6 @@ extern void tui_set_term_height_to (int); extern int tui_term_width (void); extern void tui_set_term_width_to (int); extern struct tui_locator_window *tui_locator_win_info_ptr (void); -extern void tui_clear_source_windows_detail (void); extern struct tui_win_info *tui_win_with_focus (void); extern void tui_set_win_with_focus (struct tui_win_info *); extern int tui_win_resized (void); diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index df7056ae97b..d331a2f25c7 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -207,7 +207,6 @@ tui_add_win_to_layout (enum tui_win_type type) && cur_layout != SRC_DISASSEM_COMMAND && cur_layout != SRC_DATA_COMMAND) { - tui_clear_source_windows_detail (); if (cur_layout == DISASSEM_DATA_COMMAND) show_layout (SRC_DATA_COMMAND); else @@ -219,7 +218,6 @@ tui_add_win_to_layout (enum tui_win_type type) && cur_layout != SRC_DISASSEM_COMMAND && cur_layout != DISASSEM_DATA_COMMAND) { - tui_clear_source_windows_detail (); if (cur_layout == SRC_DATA_COMMAND) show_layout (DISASSEM_DATA_COMMAND); else diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 7a4821dc52c..4520a1ac3fe 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -253,17 +253,6 @@ tui_source_window_base::show_source_content () refresh_window (); } -/* See tui-data.h. */ - -void -tui_source_window_base::clear_detail () -{ - gdbarch = NULL; - start_line_or_addr.loa = LOA_ADDRESS; - start_line_or_addr.u.addr = 0; - horizontal_offset = 0; -} - tui_source_window_base::tui_source_window_base (enum tui_win_type type) : tui_win_info (type) { diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 4c98ca3ceb2..445cc7c7357 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -101,8 +101,6 @@ protected: public: - void clear_detail (); - /* Refill the source window's source cache and update it. If this is a disassembly window, then just update it. */ void refill ();