From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56271 invoked by alias); 22 Nov 2019 00:17:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 55782 invoked by uid 89); 22 Nov 2019 00:17:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Nov 2019 00:17:25 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 4AD57201AD; Thu, 21 Nov 2019 19:17:24 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 5425220249; Thu, 21 Nov 2019 19:17:22 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 26F1C2816F; Thu, 21 Nov 2019 19:17:22 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Fri, 22 Nov 2019 00:17:00 -0000 From: "Christian Biesinger (Code Review)" To: Christian Biesinger , gdb-patches@sourceware.org Cc: Simon Marchi Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v2] Replace the MSYMBOL_*_NAME macros with member functions X-Gerrit-Change-Id: I65aa529843a9903e174ce799037e41f954a9fcee X-Gerrit-Change-Number: 688 X-Gerrit-ChangeURL: X-Gerrit-Commit: 0ae4b7cc25d1210e4dd1da8e729ede55edb34b59 In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 21 Nov 2019 19:17:21 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191122001722.26F1C2816F@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00684.txt.bz2 Christian Biesinger has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/688 ...................................................................... Patch Set 2: (2 comments) | --- gdb/symtab.h | +++ gdb/symtab.h | @@ -75,15 +75,19 @@ enum class symbol_name_match_type | SEARCH_NAME, | | /* Expression matching. The same as FULL matching in most | languages. The same as WILD matching in Ada. */ | EXPRESSION, | }; | | +/* Whether to demangle the print name of symbols. */ | + | +extern bool demangle; PS1, Line 84: Done | + | /* Hash the given symbol search name according to LANGUAGE's | rules. */ | extern unsigned int search_name_hash (enum language language, | const char *search_name); | | /* Ada-specific bits of a lookup_name_info object. This is lazily | constructed on demand. */ | ... | @@ -380,2 +384,19 @@ /* This structure is space critical. See space comments at the top. */ | struct general_symbol_info | { | + /* Short version as to when to use which name accessor: | + Use natural_name () to refer to the name of the symbol in the original | + source code. Use linkage_name () if you want to know what the linker | + thinks the symbol's name is. Use print_name () for output. Use | + demangled_name () if you specifically need to know whether natural_name () | + and linkage_name () are different. */ | + | + const char *linkage_name () const { PS1, Line 393: Done | + return name; | + } | + | + /* Return SYMBOL's "natural" name, i.e. the name that it was called in | + the original source code. In languages like C++ where symbols may | + be mangled for ease of manipulation by the linker, this is the | + demangled name. */ | + const char *natural_name () const; | + -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I65aa529843a9903e174ce799037e41f954a9fcee Gerrit-Change-Number: 688 Gerrit-PatchSet: 2 Gerrit-Owner: Christian Biesinger Gerrit-Reviewer: Christian Biesinger Gerrit-CC: Simon Marchi Gerrit-Comment-Date: Fri, 22 Nov 2019 00:17:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Simon Marchi Gerrit-MessageType: comment