From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75240 invoked by alias); 7 Feb 2018 17:31:23 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 75039 invoked by uid 89); 7 Feb 2018 17:31:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Feb 2018 17:31:21 +0000 Received: from ip-122.net-89-2-94.rev.numericable.fr (HELO stedding) ([89.2.94.122]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2018 18:31:18 +0100 Date: Wed, 07 Feb 2018 17:31:00 -0000 From: Marc Glisse Reply-To: gcc@gcc.gnu.org To: Simon Marchi cc: Jonathan Wakely , Michael Matz , Daniel Berlin , Martin Sebor , Manfred , gdb@sourceware.org, GCC Subject: Re: gdb 8.x - g++ 7.x compatibility In-Reply-To: <5a58deaaf993c5dc275386e5cd89cc37@polymtl.ca> Message-ID: References: <1517667601.3405.123.camel@gnu.org> <1b58e2df-5425-4f22-510c-d2e9f51040ba@polymtl.ca> <39845077-6bdf-f60d-9bfc-a491e7fa4fc7@gmail.com> <132fbd97-4f0d-020f-1c0f-1d4097800233@polymtl.ca> <6da16f7c-4801-4c57-2197-271db491a88f@gmail.com> <6394368bca446f08119118a0f88a30b7@polymtl.ca> <0f519031e0a603b18788589d5c1700d3@polymtl.ca> <5a58deaaf993c5dc275386e5cd89cc37@polymtl.ca> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2018-02/txt/msg00069.txt.bz2 On Wed, 7 Feb 2018, Simon Marchi wrote: > On 2018-02-07 12:08, Jonathan Wakely wrote: >> Why would they not have a mangled name? >> >>> Interesting. What do they look like, and in what context do they appear? >> >> Anywhere you need a name for linkage purposes, such as in a function >> signature, or as a template argument of another type, or in the >> std::type_info::name() for the type etc. etc. >> >> $ g++ -o test.o -c -x c++ - <<< 'struct X {}; void f(X) {} >> template struct Y { }; void g(Y) {}' && nm >> --defined-only test.o >> 0000000000000000 T _Z1f1X >> 0000000000000007 T _Z1g1YI1XE >> >> The mangled name for X is "X" and the mangled name for Y is "YI1XE" >> which includes the name "X". >> >> This isn't really on-topic for solving the GDB type lookup problem though. > > Ah ok, the class name appears mangled in other entities' mangled name. But > from what I understand there's no mangled name for the class such that > > echo | c++filt > > outputs the class name (e.g. "Foo<10>"). That wouldn't make sense, since > there's no symbol for the class itself. $ echo _Z1YI1XE | c++filt Y -- Marc Glisse