This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slow handling of C++ symbol names


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]