From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29794 invoked by alias); 7 Feb 2018 16:26:35 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29776 invoked by uid 89); 7 Feb 2018 16:26:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 spammy=H*Ad:U*dberlin, H*i:sk:6394368 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Feb 2018 16:26:33 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A4E7BADE0; Wed, 7 Feb 2018 16:26:30 +0000 (UTC) Date: Wed, 07 Feb 2018 16:26:00 -0000 From: Michael Matz To: Simon Marchi cc: Daniel Berlin , Martin Sebor , Manfred , gdb@sourceware.org, GCC Subject: Re: gdb 8.x - g++ 7.x compatibility In-Reply-To: <6394368bca446f08119118a0f88a30b7@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> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00073.txt.bz2 Hi, On Wed, 7 Feb 2018, Simon Marchi wrote: > This addresses the issue of how to do good software design in GDB to > support different producers cleanly, but I think we have some issues > even before that, like how to support g++ 7.3 and up. I'll try to > summarize the issue quickly. It's now possible to end up with two > templated classes with the same name that differ only by the signedness > of their non-type template parameter. One is Foo and the other > is Foo (the 10 is unsigned). Until 7.3, g++ would > generate names like Foo<10> for the former and names like Foo<10u> for > the later (in the DW_AT_name attribute of the classes' DIEs). Since 7.3, > it produces Foo<10> for both. Yeah, gdb needs a way to lookup types by name, and since the change DW_AT_name can't be used for this anymore. Either that needs to be fixed/reverted, or we do the more obvious thing: since types in C++ have linkage it makes sense to add the linkage (i.e. mangled) name to the types DIE using the traditional DW_AT_MIPS_linkage_name. That latter solution would have the advantage that you don't need to demangle anything anymore. From vtable you get to typeinfo, from there for typeinfo name, and that contains the mangled type name (without _Z prefix). Ciao, Michael.