Slow handling of C++ symbol names
Ian Lance Taylor
ian@wasabisystems.com
Wed Dec 3 17:54:00 GMT 2003
Daniel Jacobowitz <drow@mvista.com> writes:
> On Wed, Dec 03, 2003 at 12:34:31PM -0500, Ian Lance Taylor wrote:
> > Daniel Jacobowitz <drow@mvista.com> writes:
> >
> > > GDB never does set DMGL_VERBOSE. Are you sure the old demangler
> > > wouldn't produce that without DMGL_VERBOSE?
> > >
> > > Maybe the old demangler had a test reversed. ISTR that c++filt passes
> > > DMGL_VERBOSE, and that generates std::string rather than
> > > std::basic_string for the above.
> >
> > Well, hmmm. The code looks right to me. When I run my copy of
> > c++filt built with the old demangler, I get the long string, as
> > expected.
> >
> > I note that DMGL_VERBOSE was only added on 2002-02-05, so if you're
> > using a c++filt from sources before that you will get the smaller
> > demangling.
>
> I'm using one from binutils as of a month or so ago, and I get the
> short string. Hmm. I don't know quite what's going on.
Me neither.
Everything makes sense to me and I get the results I expect. If we
want to pursue this further, though it may not matter much, I think
you need to debug your c++filt. See if flag_verbose is set. The
relevant function is called demangle_substitution(). The first call
to the function will call result_add() with either std::string or the
longer version.
Ian
More information about the Gdb
mailing list