This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: D Symbol Demangling
On Mon, Apr 24, 2006 at 10:21:15AM -0700, Jim Blandy wrote:
> The other demanglers are all in libiberty; shouldn't this one go there, too?
Well, the old and new C++ demanglers are in libiberty, and the "Java
demangler" is part of that. But there's an Ada demangler in GDB
already.
On Sat, Apr 22, 2006 at 12:24:24AM +0200, Thomas Kühne wrote:
> I've no problem with assigning the copyright of the demangler to the FSF if
> the license issue - as you noted, using more than one license might cause
> problems - can be solved.
>
> The GPL with linking exception would seem to be the best solution for all.
> (taken from /usr/portage/licenses/GPL-2-with-linking-exception)
>
> | As a special exception, the copyright holders of this library give you
> | permission to link this library with independent modules to produce an
> | executable, regardless of the license terms of these independent modules,
> | and to copy and distribute the resulting executable under terms of your
> | choice, provided that you also meet, for each linked independent module,
> | the terms and conditions of the license of that module. An independent
> | module is a module which is not derived from or based on this library. If
> | you modify this library, you may extend this exception to your version of
> | the library, but you are not obligated to do so. If you do not wish to do
> | so, delete this exception statement from your version.
>
> <followed by the GPL text>
I don't know what permissions we need to generate new code under this
license; does anyone else know? Do we need to check it with the FSF?
They're usually reasonable about such things, but obviously they prefer
the stronger GPL when possible.
> > And, no offense, but the DD_() thing is horribly ugly and doesn't seem
> > to serve any purpose here. Is that for reusing the demangler
> > elsewhere?
>
> Yes it's ugly and not the kind of code I normally write.
> The problem: the demangler is currently used with GDB, Valgrind and 3
> in-house tools - thus name and symbol clashes are a real problem.
What's the actual interface to the demangler? All I see is a single
function:
char* DD_(demangle_d)(char*);
If that's the case, it ought to be possible to make everything else
static by careful use of #include, and then presto - no name clashes.
--
Daniel Jacobowitz
CodeSourcery