Slow handling of C++ symbol names
Daniel Jacobowitz
drow@mvista.com
Wed Dec 3 17:08:00 GMT 2003
On Wed, Dec 03, 2003 at 11:57:56AM -0500, Ian Lance Taylor wrote:
> mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:
>
> > So far I've found one type of difference that looks like a bug in the
> > new demangler.
> >
> > _ZStltI9file_pathSsEbRKSt4pairIT_T0_ES6_
> > OLD: bool std::operator< <file_path, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::pair<file_path, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, std::pair<file_path, std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > const&)
> > NEW: bool std::operator<<file_path, std::string>(std::pair<file_path, std::string> const&, std::pair<file_path, std::string> const&)
> >
> > The old demangler produces "operator< <", and the new demangler produces
> > "operator <<". I'm not a name mangling expert but I think that
> > "operator <" is correct here and the new demangler suffers from
> > shift-operator-versus-template-syntax gotcha.
>
> Whoops. Quite right.
>
> The old name you list above was generated using DMGL_VERBOSE. I can
> tell by use of std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > where the new demangler just uses std::string.
> The old demangler generates the former with DMGL_VERBOSE, or
> std::string without DMGL_VERBOSE.
>
> If the old demangler is being run with DMGL_VERBOSE, then I'm not
> surprised that the resulting strings are much larger. That was the
> main thing which concerned me, since I didn't see anything in gdb
> which passed DMGL_VERBOSE to the demangler.
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.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gdb
mailing list