This is the mail archive of the binutils@sourceware.cygnus.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]

Re: Demangler update?


   Date: Thu, 13 Apr 2000 20:37:22 -0400
   From: Ken Block USG <block@zk3.dec.com>

   H.J. submitted this patch for the demangler a while back and it has not
   been checked in. The patch provides:

   1) support for GNAT ada compiler.
   2) adds a --style switch to a number of tools to allow them to specify
   which demangler to be used.
   3) It adds the ability to dynamic load a demangler that is shipped
   independently.


   Compaq C++ depends on this patch. What needs to be done to get this
   demangler patch checked in?  If I redid this patch against the latest
   snapshot and broke it down into smaller pieces, would somebody be
   willing to check it in?


   http://gcc.gnu.org/ml/gcc-patches/1999-10n/msg00258.html

First let me say that I think that the gcc/g++ maintainers are
responsible for the changes to libiberty.  I encourage them to
evaluate this patch and work to get some version of it checked in.  I
am not a gcc/g++ maintainer myself.

For myself, I think this patch definitely needs work.  I also think it
would help a lot to break it down, since there are several things
mixed into it.

The most problematical aspect to it is the dynamic loading support,
which is probably what you care about.

I'm personally not convinced that dynamic loading support is necessary
at all.  It seems like the wrong approach.  Rather than requiring
dynamic loading, we should follow the Unix way: use a small program.
It should be possible to write any demangler to filter the input
stream, as c++filt does.  Then demangling symbols is simply a matter
of running them through a program.  pipe/fork/exec is a standard fully
portable Unix paradigm.  Dynamic loading adds no special capabilities
here.

If we are going to add dynamic loading, then it must be documented.
It must not be specific to GNU/Linux.  Special cases for compaq should
not be required, and should be completely eliminated from the code.
It makes no sense to introduce a brand new interface which permits
more flexibility in demangling and then make it inflexible.  The style
name should somehow automatically translate into the shared library to
use.

Other than the dynamic linking, I think it should be possible to get
most of this patch checked in.

Ian

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