From patchwork Sun Aug 18 17:27:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34174 Received: (qmail 78017 invoked by alias); 18 Aug 2019 17:27:53 -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 77674 invoked by uid 89); 18 Aug 2019 17:27:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 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=Display X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Aug 2019 17:27:43 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 999F64329A for ; Sun, 18 Aug 2019 12:27:42 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id zOxyhyW1z4FKpzOxyh4a84; Sun, 18 Aug 2019 12:27:42 -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=TYHRuTzTXe1AEmLHz00JmZfeW9jeeLXLGYUZtUlxkbc=; b=F8g860iHMF8d2VyTaUzUTw/BXc DoDxCT5TJPwOVY8pnGrU/QYuZ73UuDJ5pz5OahzMTVUxB8ItW/uhFZx0OhomDGBeC1wzQwofZ6ume KJkBEJcDY3Ur2QnB9ZnDZF2ap; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:44512 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hzOxy-002aYY-BU; Sun, 18 Aug 2019 12:27:42 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 14/14] Change some tui_data_window methods to be private Date: Sun, 18 Aug 2019 11:27:35 -0600 Message-Id: <20190818172735.17477-15-tom@tromey.com> In-Reply-To: <20190818172735.17477-1-tom@tromey.com> References: <20190818172735.17477-1-tom@tromey.com> Turning various calls into methods has made it possible to now change some tui_data_window methods to be private. gdb/ChangeLog 2019-08-18 Tom Tromey * tui/tui-regs.h (struct tui_data_window) : Now private. --- gdb/ChangeLog | 7 ++++++ gdb/tui/tui-regs.h | 62 ++++++++++++++++++++++++---------------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index de445578807..95e944038c7 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -68,28 +68,20 @@ struct tui_data_window : public tui_win_info int regs_column_count = 0; struct reggroup *current_group = nullptr; - /* Answer the number of the last line in the regs display. If there - are no registers (-1) is returned. */ - int last_regs_line_no () const; + void check_register_values (struct frame_info *frame); - /* Answer the line number that the register element at element_no is - on. If element_no is greater than the number of register - elements there are, -1 is returned. */ - int line_from_reg_element_no (int element_no) const; + void show_registers (struct reggroup *group); - /* Answer the index of the first element in line_no. If line_no is - past the register area (-1) is returned. */ - int first_reg_element_no_inline (int line_no) const; +protected: - /* Displays the data that is in the data window's content. It does - not set the content. */ - void display_all_data (); + void do_scroll_vertical (int num_to_scroll) override; + void do_scroll_horizontal (int num_to_scroll) override + { + } - /* Delete all the item windows in the data window. This is usually - done when the data window is scrolled. */ - void delete_data_content_windows (); + void rerender () override; - void erase_data_content (const char *prompt); +private: /* Display the registers in the content from 'start_element_no' until the end of the register content or the end of the display @@ -102,17 +94,6 @@ struct tui_data_window : public tui_win_info started from. If nothing is displayed (-1) is returned. */ int display_registers_from_line (int line_no); - void check_register_values (struct frame_info *frame); - - void show_registers (struct reggroup *group); - -protected: - - void do_scroll_vertical (int num_to_scroll) override; - void do_scroll_horizontal (int num_to_scroll) override - { - } - /* Return the index of the first element displayed. If none are displayed, then return -1. */ int first_data_item_displayed (); @@ -123,11 +104,32 @@ protected: display off the end of the register display. */ void display_reg_element_at_line (int start_element_no, int start_line_no); - void rerender () override; - void show_register_group (struct reggroup *group, struct frame_info *frame, int refresh_values_only); + + /* Answer the number of the last line in the regs display. If there + are no registers (-1) is returned. */ + int last_regs_line_no () const; + + /* Answer the line number that the register element at element_no is + on. If element_no is greater than the number of register + elements there are, -1 is returned. */ + int line_from_reg_element_no (int element_no) const; + + /* Answer the index of the first element in line_no. If line_no is + past the register area (-1) is returned. */ + int first_reg_element_no_inline (int line_no) const; + + /* Displays the data that is in the data window's content. It does + not set the content. */ + void display_all_data (); + + /* Delete all the item windows in the data window. This is usually + done when the data window is scrolled. */ + void delete_data_content_windows (); + + void erase_data_content (const char *prompt); }; #endif /* TUI_TUI_REGS_H */