This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] dwarf2_physname


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 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]