From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124809 invoked by alias); 1 Mar 2018 21:03:35 -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 124273 invoked by uid 89); 1 Mar 2018 21:03:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.2 spammy=U*pinskia, sk:pinskia, H*f:sk:CL2MAbZ, H*i:sk:08GrJRE 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; Thu, 01 Mar 2018 21:03:33 +0000 Received: by mail-io0-f174.google.com with SMTP id e7so8624454ioj.1 for ; Thu, 01 Mar 2018 13:03:33 -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=zMMaWDKmcH7pS1uDEKagzUBktUEHvXIj6JqgSKd21sI=; b=pMFvJVH+3+vA44jw6xut8XirQFDkA0MjnFS3hAdwxuDxq2YtaRMV9e76z0gvcKO6qm get5WAnZTmGp3PPbxR3lKOiDqcDVtXzIjN56GIywCQ84Po0CyKgip/a+iYEdULgXFxcx DbRERBMxDTqy2YuDlrlg+HmqKNHTmJ0ISDC/G9mA8Ovi18qz9esrhijeQcqob10B6GEt vwt19IxbdHcKgv0zjOMZopOdTPnrY+jzMmKForI8dZglPR+zSGpcIwxKnvmFdqPS0I38 zSFPCxG3/Tl1vRcVTGSCsUG/5yV4eFaK1QdUOhzA/v5bKKzx7r6Ao7XbaJqDCUpImrzm kLNg== X-Gm-Message-State: APf1xPDhBAs02X+OWxmaWJRYIfzckW1NfeS68RBxKHe6kKP99bfDmOIp MIG1nFt7bJ2OtLsjOy2KdHkIaD+iIiBsgr6G6BuZUQ== X-Google-Smtp-Source: AG47ELtdtQ8/3kE3RV8d6J0liMZ4hN8Ear28NU1AkAqpUJHRSSgCW7+Fqq7la5ULk0LZTJ/t1AN6DnGFC3+mxTP7kSM= X-Received: by 10.107.6.139 with SMTP id f11mr3864550ioi.23.1519938211651; Thu, 01 Mar 2018 13:03:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.17.200 with HTTP; Thu, 1 Mar 2018 13:03:11 -0800 (PST) In-Reply-To: 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> From: Jason Merrill Date: Thu, 01 Mar 2018 21:03:00 -0000 Message-ID: Subject: Re: gdb 8.x - g++ 7.x compatibility To: Andrew Pinski Cc: Roman Popov , Richard Biener , Simon Marchi , Martin Sebor , Manfred , GDB Development , GCC Development Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-03/txt/msg00006.txt.bz2 On Thu, Mar 1, 2018 at 3:26 PM, Andrew Pinski wrote: > On Thu, Mar 1, 2018 at 12:18 PM, Roman Popov wrote: >> Is there any progress on this problem? >> >> I'm not familiar with G++ , but I have little experience with LLVM. I can >> try make LLVM emitting mangled names to DW_AT_name, instead of demangled >> ones. >> This way GDB can match DW_AT_name against RTTI. And for display it can >> call abi::__cxa_demangle(name, NULL, NULL, &status), from #include >> . >> >> Will it work? > > > Reading http://wiki.dwarfstd.org/index.php?title=Best_Practices: > the DW_AT_name attribute should contain the name of the corresponding > program object as it appears in the source code, without any > qualifiers such as namespaces, containing classes, or modules (see > Section 2.15). A consumer can easily reconstruct the fully-qualified > name from the DIE hierarchy. In general, the value of DW_AT_name > should be such that a fully-qualified name constructed from the > DW_AT_name attributes of the object and its containing objects will > uniquely represent that object in a form natural to the source > language. > > > So having the mangled symbol in DW_AT_name seems backwards and not the > point of it. If we add the mangled name, which seems reasonable, it should be in DW_AT_linkage_name. Jason