This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Licensing inconsistency, cplus-dem.c/cp-demangle.c/demangle.h
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Per Bothner <per at bothner dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 20 Dec 2001 14:01:16 +1300
- Subject: Re: Licensing inconsistency, cplus-dem.c/cp-demangle.c/demangle.h
- References: <20011219210952.GA29620@codesourcery.com> <3C210D9F.7000206@bothner.com>
Per Bothner wrote:
> It may be desirable to use GPL+exception, to demangle GCJ stack-traces.
Yes, this would be very desirable.
> Currently, we filter stack traces through a forked c++filt, because
> of the license. On the other hand, there has been talk that it would
> be better anyway (though more work) to use the dwarf2 eh-unwinding code.
I think we still need a demangler even if we were using the dwarf2
unwinder. The stack trace involves several steps:
1. Get the PC for each stack frame (currently done using glibc
backtrace(), should eventually be done with dwarf2 unwinder)
2. Look up symbol using dynamic loader API.
3. Demangle symbol.
4. (optional) Look up source file info and line number using addr2line.
For the demangling step, we may eventually want to use it to determine
the java class associated with a stack frame, and being able to call the
demanger directly will make that easier. It would also make it possible
to get a stack trace on a non-native target, or where c++filt is not
installed.
regards
Bryce.