This is the mail archive of the
mailing list for the GCC project.
Re: RFA: Improvements to libiberty v3 demangler
On Tue, Nov 18, 2003 at 11:06:12PM -0500, Ian Lance Taylor wrote:
> Daniel Jacobowitz <email@example.com> writes:
> > On Tue, Nov 18, 2003 at 10:24:22PM -0500, Ian Lance Taylor wrote:
> > > Here are some patches which improve the libiberty v3 demangler. These
> > > mostly improve the handling of CV qualifiers. Previously these would
> > > tend to appear at the end of the string. This patch attempts to put
> > > them in the right place. This fixes some of the errors caught by the
> > > testsuite, and does not introduce any new errors.
> > >
> > > After getting this far, I've realized that the whole approach used by
> > > this code is fundamentally broken. Thie approach taken by this code
> > > can not handle substitutions correctly, because demangling pointers
> > > and references to substitutions, to say nothing of qualifiers,
> > > requires knowing the structure of the substitution source, and this
> > > code does not have that information.
> > >
> > > Still, this patch is an improvement over what is there now, and does
> > > fix some bugs.
> > I don't suppose you've run the GDB testsuite with these changes?
> > Something which moves CV qualifiers around is likely to break it. Not
> > badly, but enough to need to tweak the regexes again.
> Thanks for the suggestion.
> I just checked the gdb testsuite, and it doesn't appear to make any
> difference. I'm not sure the gdb testsuite really tests the v3
> demangler code at all. At least, I don't see any tests for it in
We don't check the demangler in demangle.exp, because it has its own
testsuite. It does, however, affect output in a number of other C++
MontaVista Software Debian GNU/Linux Developer