Licensing inconsistency, cplus-dem.c/cp-demangle.c/demangle.h
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Wed Dec 19 17:47:00 GMT 2001
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.
More information about the Gcc
mailing list