This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Demangling of method names and addr2line/c++filt


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]