This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: FYI: A new C++ demangler


"H. J. Lu" <hjl@lucon.org> writes:


I will put a new C++ demangler in Linux binutils, which should fix all
known bugs in the old demangler. It is written in C++. It will be
enabled only if there is a working C++ compiler. Otherwise, the old
demangler will be used.


Having read the discussion on the GCC mailing list, I am convinced it
is undesirable to have two demanglers that have overlapping
functionaility for GDB, especially if the demangler is selected based
on the build environment as you propose.

GDB should be buildable by a ISO C90 compiler, so we can't use C++ for
any of its "standard" parts.

I could live with making the demangler "optional", and removing the
old demangler completely.  But only if the new demangler is a major
improvement over the old one (which I can't judge).

GDB can't :-(


Could someone fix the old demangler, or write a new one in
plain C (or re-write the C++ one in C)?  Pretty please?

Yes. There's no reason for the underlying demangler algorithm to be implemented in vanila ISO C 90, and then wrap it for the C++ side.


HJ, as a start why not separate out and submit these new tests you refered to? Knowing what's broken is a good starting point.

Andrew



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