This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Make a standalone GNU V3 C++ demangler
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, gcc-patches at gcc dot gnu dot org,carlo at alinoe dot com
- Date: Wed, 23 Apr 2003 23:41:21 -0400
- Subject: Re: RFC: Make a standalone GNU V3 C++ demangler
- References: <20030423164920.A26737@lucon.org>
On Wed, Apr 23, 2003 at 04:49:20PM -0700, H. J. Lu wrote:
> It is known that the curren GNU V3 C++ demangler in libiberty has many
> shortcomings and the one in libstdc++-v3 works much better. Noone seems
> maintaining the libiberty demangler while the one in libstdc++ is being
> actively worked on by Carlo. This is an attempt to create a standalone
> GNU V3 C++ demangler and make it available to libiberty. The main
> reason to make it standalone is this demangler is in C++ and requires
> a working C++ compiler with a working <vector>. That means it can only
> be built after libstdc++ is available. The standalone demangler will
> be built after libiberty and libstdc++ are completed. I am enclosing 2
> patches here. One is for demangler and the other is for libstdc++ to
> use it. The demangler's patch is also for binutils. I have tested them
> natively on gcc mainline and binutils under RedHat 9 and I didn't
> notice any problems.
Does this patch actually make it available to libiberty? And is the
intent to obsolete and remove the v3 demangler currently in libiberty?
I just want to make it clear that (if so) you're introducing the
requirement for a host C++ compiler in order to build either GDB or
c++filt. That's reasonable, but I don't want it to happen unnoticed,
and I don't think it should happen without informing the affected
projects.
>
> Known issues:
>
> 1. Although I tried to deal with the case where no C++ compiler is
> available, I didn't test it myself. Let me know if there is a problem.
> 2. I didn't test cross build. I don't expect there are many serious
> problems. Again let me know if there is a problem.
> 3. Multi-lib support is incomplete. Someone who is familiar with it
> should look into it.
>
> BTW, after applying demangler-new.patch.gz, you need to run autoconf
> 2.13 at the top level to regenerate configure.
>
> Here are ChangeLog entries. Any comments are welcome.
>
> BTW, please CC me since I am not on gcc-patches at gcc dot gnu dot org dot
>
>
> H.J.
> ---
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * Makefile.def: Add demangler.
> * Makefile.tpl: Likewise.
> * configure.in: Likewise.
>
> * Makefile.in: Regenerated.
> * configure: Likewise.
>
> demangler/
>
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * Makefile.am: New file.
> * Makefile.in: Likewise.
> * acinclude.m4: Likewise.
> * aclocal.m4: Likewise.
> * configure: Likewise.
> * configure.in: Likewise.
>
> 2003-04-23 Carlo Wood <carlo at alinoe dot com>
> H.J. Lu <hjl at gnu dot org>
>
> * allocator.h: New C++ file.
> * demangler.cc: Likewise.
> * demangler.h: Likewise.
> * dynstring.h: Likewise.
>
> libiberty/
>
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * testsuite/demangle-expected: Add more GNU V3 testcases.
>
> libstdc++-v3/
>
> 2003-04-19 H.J. Lu <hjl at gnu dot org>
>
> * include/Makefile.am (bits_headers): Remove
> ${bits_srcdir}/demangle.h.
> * include/Makefile.in: Regenerated.
>
> * include/bits/demangle.h: Removed.
>
> * libsupc++/Makefile.am (headers): Add bits/demangle.h.
> (sources): Add demangle.cc.
> (demangle.lo): New rule.
> (demangle.o): Likewise.
> (demangle.cc): Likewise.
> (bits/demangle.h): Likewise.
> (install-glibcppinstallHEADERS): Install bits/demangle.h.
> * libsupc++/Makefile.in: Regenerated.
>
> * src/Makefile.am (sources): Remove demangle.cc.
> (demangle.lo): Likewise.
> (demangle.o): Likewise.
> * src/Makefile.in: Regenerated.
>
> * src/demangle.cc: Removed.
>
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * Makefile.def: Add demangler.
> * Makefile.tpl: Likewise.
> * configure.in: Likewise.
>
> * Makefile.in: Regenerated.
> * configure: Likewise.
>
> demangler/
>
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * Makefile.am: New file.
> * Makefile.in: Likewise.
> * acinclude.m4: Likewise.
> * aclocal.m4: Likewise.
> * configure: Likewise.
> * configure.in: Likewise.
>
> 2003-04-23 Carlo Wood <carlo at alinoe dot com>
> H.J. Lu <hjl at gnu dot org>
>
> * allocator.h: New C++ file.
> * demangler.cc: Likewise.
> * demangler.h: Likewise.
> * dynstring.h: Likewise.
>
> libiberty/
>
> 2003-04-23 H.J. Lu <hjl at gnu dot org>
>
> * testsuite/demangle-expected: Add more GNU V3 testcases.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer