This is the mail archive of the
mailing list for the Archer project.
Re: [python] Anonymous namespaces prevent some Python pretty-printing
- From: Tom Tromey <tromey at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: archer at sourceware dot org
- Date: Mon, 17 Nov 2008 10:13:19 -0700
- Subject: Re: [python] Anonymous namespaces prevent some Python pretty-printing
- References: <20081107235130.41ECC3A6B0E@localhost><20081110224335.GA11484@caradoc.them.org>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Daniel" == Daniel Jacobowitz <email@example.com> writes:
>> That's because
>> cp_demangled_name_to_comp("std::map<int, <unnamed>::Foo, std::less<int>, std::allocator<std::pair<const int, <unnamed>::Foo> > >", ...)
>> returns NULL, with error set to "syntax error, near ..."
Daniel> FWIW, there's already support for anonymous namespaces in the parser -
Daniel> but it sounds like this is something that has changed in GCC
Daniel> w.r.t. how anonymous namespaces are labeled. The demangler produces
Daniel> (anonymous namespace)::Foo.
I see this in the dwarf from a simple example:
<41> DW_AT_name : (indirect string, offset: 0x33): map<int, <unnamed>::Foo*>
I think that <unnamed> comes from g++, there are a couple places where
I suppose I can try to make gdb recognize <unnamed> as well.
Or, we could fix it in g++ -- it seems strange that g++ and the
demangler would disagree.