From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69069 invoked by alias); 7 Feb 2018 17:30:36 -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 68844 invoked by uid 89); 7 Feb 2018 17:30:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:5a58dea, H*i:sk:5a58dea, Hx-languages-length:1224 X-HELO: mail-io0-f174.google.com Received: from mail-io0-f174.google.com (HELO mail-io0-f174.google.com) (209.85.223.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Feb 2018 17:30:17 +0000 Received: by mail-io0-f174.google.com with SMTP id z6so2808441iob.11 for ; Wed, 07 Feb 2018 09:30:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hSop4pg3OTcIr2uGKr4buv2W2WpTi+rCP72ARLgOhSI=; b=Qqa6/EWTSbczfXYw4znnPZ43tMMwqjy0XtKaqrhpTrvzsEqZkodXbYeYzptLy1LGB1 DH2HDKxJr2Nvdyfa0z8gTG1pms9LLQbieFfzKZTVmkvZuX47t/2J9UI2AVJG5ackPe9f axxKbVOJI4fYn6kg5q7PgnS3d8gZCnlJvjFBXKBa91YnnjzJKi4NQUpPGxq4Nn1SeQGw SqRcGy3IJCshGjMJXVwc1GSO/hmOeWn//8OASj6UlTOxzatwPi2T5CKJYX2EViqB/IIe baHm0CRon4eQv22alY5NFwhST8sDzIuYySiI1JCm1HduwNbq2eLbMzwtTw+1eEyVZCXq 7WaA== X-Gm-Message-State: APf1xPBrrcxI1qDnH53moM+0JBZB0cYlfGM0IG2/gpFb4fW+09xOZ9KJ 30fXKe4ovMsEpyUGQ/3iO2K+K9H5wniVNjgpjvU= X-Google-Smtp-Source: AH8x224rHVtEgS9TrmqGJ91bC29matXZqrLyXLlJosf7RXOk5JfW5t5WIqcFRyZZN3tRXYMATYYDlbuj7vXjelw6Pbc= X-Received: by 10.107.201.206 with SMTP id z197mr8159690iof.50.1518024604919; Wed, 07 Feb 2018 09:30:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.50.198 with HTTP; Wed, 7 Feb 2018 09:30:04 -0800 (PST) In-Reply-To: <5a58deaaf993c5dc275386e5cd89cc37@polymtl.ca> 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> From: Jonathan Wakely Date: Wed, 07 Feb 2018 17:30:00 -0000 Message-ID: Subject: Re: gdb 8.x - g++ 7.x compatibility To: Simon Marchi Cc: Michael Matz , Daniel Berlin , Martin Sebor , Manfred , gdb@sourceware.org, GCC Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-02/txt/msg00068.txt.bz2 On 7 February 2018 at 17:20, 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 _Z3FooILi10EE | c++filt