This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Export bits of the demangler's internal interface
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 31 Dec 2003 15:29:46 -0500
- Subject: Re: Export bits of the demangler's internal interface
- References: <20031230213416.GA16140@nevyn.them.org>
Daniel Jacobowitz <drow@mvista.com> writes:
> What do you think of the below? These are the bits of the demangler that
> I'm currently re-using in GDB. It's not a pretty interface, but I'm more
> interested in using it than designing a proper interface for it; if you'd
> rather do this from the other side first then I can put some more thought
> into it. Right now it's easy enough to update all clients when you make an
> incompatible change.
My bias would be toward designing an interface which is at least
slightly better. In particular, I'm not sure the arrays should be
exposed as arrays.
I gather that the main thing you need is the ability to generate
arbitrary mangling trees, and the ability to print the demangled
string corresponding to such a tree.
> Also, how concerned are you about changing the demangler output? Is that a
> major compatibility issue? I'd like to print char constants using
> single-quoted literals, instead of numerically.
Changing the demangler output is not a major compatibility issue.
Ideally any changes from here on out should be reflected in the
libiberty testsuite, so that we at least don't change them
accidentally.
Ian