From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12707 invoked by alias); 1 Sep 2009 23:42:20 -0000 Received: (qmail 12693 invoked by uid 22791); 1 Sep 2009 23:42:20 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 23:42:14 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id DA6F7108C6; Tue, 1 Sep 2009 23:42:12 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id BD3A01055A; Tue, 1 Sep 2009 23:42:12 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MiczM-0000YO-A6; Tue, 01 Sep 2009 19:42:12 -0400 Date: Tue, 01 Sep 2009 23:42:00 -0000 From: Daniel Jacobowitz To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA] dwarf2_physname Message-ID: <20090901234212.GB32355@caradoc.them.org> Mail-Followup-To: Keith Seitz , gdb-patches@sourceware.org References: <4A9C358E.2050904@redhat.com> <4A9C54F6.1000909@eagercon.com> <4A9C5A66.7060609@redhat.com> <20090901221122.GA24658@caradoc.them.org> <4A9DADB6.2090508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A9DADB6.2090508@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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 X-SW-Source: 2009-09/txt/msg00044.txt.bz2 On Tue, Sep 01, 2009 at 04:26:46PM -0700, Keith Seitz wrote: > On 09/01/2009 03:11 PM, Daniel Jacobowitz wrote: > >I assume this patch is a distant descendant of the one I sent you a > >while back. Is its goal to create a useful name for each symbol, or > >to match the one produced by some other source - probably the > >demangler? What sort of template cases have you looked at? > > Yes, this is based on the patches you sent me a long, long time ago. > The goal is to generate a physname that is unique; it may match the > output of the demangler, but that is not a requirement. It is > supposed to construct valid, fully-qualified names, i.e, you won't > see "std::string" as a physname. It's really "std::basic_string blah blah>". OK. That'd be a big improvement over the last state of my tree; in order to call a memeber function, we had to match the ELF symbol exactly or GDB would bogusly report it as "inlined". If uniqueness is all that's required, maybe there's some less expensive representation than a string encoding of the arguments? > > The template cases I've looked at are checked-in on the > archer-keiths-realcpp-test branch. I've just committed the latest and > greatest version of realcpp.{exp,cc} here: http://tinyurl.com/lkaadh > (git.sourceware.org -- sorry for the tinyurl thing, git URL names are > loooooooong). > > Unfortunately, I cannot speak to other compilers, only gcc. I'm happy to test with RealView. I might be able to test with ICC also, but I haven't tried that in forever. I believe it's freely available. > What do you want to do with this? Print it and break/list it? Yes, but especially call it. Even more so if it were a member function - sorry, my C++ is rusty, but hopefully one or the other of us could construct such an example. I'm at my two-a-day limit on templates. > I know that "f<(char*)(&Foo)>" is ugly, but that is the name that gcc > gives us (DW_AT_name for this DIE), so we have to use it. [I am > assuming we could get this cleaned up/"fixed" in gcc.] We could, as long as we do something not horribly nonsensical with the names there now - which are a bit random. -- Daniel Jacobowitz CodeSourcery