Demangling broken (was: Re: [PATCH] Demangler woes with current CVS and type names)

H . J . Lu hjl@lucon.org
Thu Jan 31 16:56:00 GMT 2002


On Thu, Jan 31, 2002 at 06:52:27PM -0500, Phil Edwards wrote:
> On Thu, Jan 31, 2002 at 06:22:31PM -0500, Daniel Jacobowitz wrote:
> > > > Either way seems a partial solution, solving the "data" ->
> > > > "double" error, but not to the "d" -> "double" error.
> > > 
> > > Ah, I see the problem more clearly now; thanks.  Yes, it looks like an option
> > > is needed.  I'll look into some kind of "no type demangling" flag somewhere.
> > 
> > Please go the other way.  This is an incompatible interface change -
> > and you've seen the violence you did to GDB and LD testsuites with this
> > patch by now, right?
> 
> That's what this whole conversation has been about... have you read
> the thread?
> 
> If by "the other way" you mean checking for leftover characters in the
> mangled string, it won't work; see H-P's mail.  An identifier called 'i'
> would be incorrectly demangled as 'int' but no characters are left over.
> 
> 
> Sigh.  I'll revert the patch when I have time to patch and test, about an
> hour or so from now.
> 

Can we add

/* V3 ABI demangling entry points, defined in cp-demangle.c. Also
   demagle types. */
extern char*
cplus_demangle_v3_type PARAMS ((const char* mangled));

and only call cplus_demangle_v3_type from c++filt?

H.J.



More information about the Binutils mailing list