From patchwork Tue Sep 10 19:08:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34485 Received: (qmail 26459 invoked by alias); 10 Sep 2019 19:09:13 -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 25976 invoked by uid 89); 10 Sep 2019 19:09:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.4 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: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (50.116.127.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2019 19:09:09 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway36.websitewelcome.com (Postfix) with ESMTP id DE642400C9DCD for ; Tue, 10 Sep 2019 13:35:45 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 7lViioclv2qH77lViiio1b; Tue, 10 Sep 2019 14:09:06 -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=gHJtIW7ZqH5wCa6OjPdNC2dSIoBbn9S6vSVDmZ+kNyE=; b=VLVcMLWaQCJWSEVHS4f6sLxfaY l06RIipJajf+ufhofnxl32ancmHBqIQdJrVsk6UpQ33v/vTfm0uWrbzVCp5Gr7wsajyLfp2gpEcfB xzsLM2GhC+KXeSIrV4HUCq00N; Received: from 71-218-73-27.hlrn.qwest.net ([71.218.73.27]:51788 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1i7lVi-000EcZ-49; Tue, 10 Sep 2019 14:09:06 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 16/20] Rename a private data member in tui_source_window Date: Tue, 10 Sep 2019 13:08:53 -0600 Message-Id: <20190910190857.6562-17-tom@tromey.com> In-Reply-To: <20190910190857.6562-1-tom@tromey.com> References: <20190910190857.6562-1-tom@tromey.com> This renames tui_source_window::fullname to add the "m_" prefix, as it is a private data member. gdb/ChangeLog 2019-09-10 Tom Tromey * tui/tui-source.h (struct tui_source_window) : Rename from "fullname". * tui/tui-source.c (tui_source_window::set_contents) (tui_source_window::location_matches_p) (tui_source_window::maybe_update): Update. --- gdb/ChangeLog | 8 ++++++++ gdb/tui/tui-source.c | 6 +++--- gdb/tui/tui-source.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index e6cc0dbc1a3..fa6ed7893fe 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -155,7 +155,7 @@ tui_source_window::set_contents (struct gdbarch *arch, title = s_filename; - fullname = make_unique_xstrdup (symtab_to_fullname (s)); + m_fullname = make_unique_xstrdup (symtab_to_fullname (s)); cur_line = 0; gdbarch = get_objfile_arch (SYMTAB_OBJFILE (s)); @@ -275,7 +275,7 @@ tui_source_window::location_matches_p (struct bp_location *loc, int line_no) return (content[line_no].line_or_addr.loa == LOA_LINE && content[line_no].line_or_addr.u.line_no == loc->line_number && loc->symtab != NULL - && filename_cmp (fullname.get (), + && filename_cmp (m_fullname.get (), symtab_to_fullname (loc->symtab)) == 0); } @@ -307,7 +307,7 @@ tui_source_window::maybe_update (struct frame_info *fi, symtab_and_line sal, start_line = 1; bool source_already_displayed = (sal.symtab != 0 - && showing_source_p (fullname.get ())); + && showing_source_p (m_fullname.get ())); struct tui_line_or_address l; diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h index 30728e4214e..3ef737c56e9 100644 --- a/gdb/tui/tui-source.h +++ b/gdb/tui/tui-source.h @@ -77,7 +77,7 @@ private: bool line_is_displayed (int line) const; /* It is the resolved form as returned by symtab_to_fullname. */ - gdb::unique_xmalloc_ptr fullname; + gdb::unique_xmalloc_ptr m_fullname; /* A token used to register and unregister an observer. */ gdb::observers::token m_observable;