This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Demangling of method names and addr2line/c++filt
- From: Mark Wielaard <mark at klomp dot org>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: 12 Feb 2003 23:25:02 +0100
- Subject: Re: Demangling of method names and addr2line/c++filt
- Organization:
- References: <3E4AA60D.D8D7E13E@hotmail.com>
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