Demangling of method names and addr2line/c++filt

Mark Wielaard mark@klomp.org
Wed Feb 12 22:25:00 GMT 2003


Hi,
On Wed, 2003年02月12日 at 20:52, Ranjit Mathew wrote:
> What about other platforms like Solaris, Darwin, etc.? Can I
> blindly add the "-n" flag to c++filt and get the correct 
> output in all cases?
>> If yes, I would like to submit a patch for the same. If not,
> can someone please tell me a better approach that solves the
> problem?

To be honest I am not qualified to give an answer since I can only test
on gnu-linux based machines.
But if you only need an extra underscore to make this work on your
platform then what you can do is add a new boolean system property
"gnu.gcj.runtime.NameFinder.demangle_extra_underscore" or something
similar that tells NameFinder whether to add an extra underscore to the
mangled function name before demangeling it (use it in
NameFinder.demangleName(String)).
Then you can add some logic in java/lang/natRuntime.java
java::lang::Runtime::insertSystemProperties() to set this property to
true for the appropriate platforms.
See the GCJ manual for the other system properties used by NameFinder:
http://gcc.gnu.org/onlinedocs/gcj/libgcj-Runtime-Properties.html#libgcj%20Runtime%20Properties
Cheers,
Mark


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /