Demangling of method names and addr2line/c++filt

Ranjit Mathew rmathew4lists@hotmail.com
Thu Feb 13 06:00:00 GMT 2003


[NOTE: Mark, I'm awfully sorry that you'd be receiving this message
for the *third* time, but I forgot to CC the list on my last message.]


> > 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
>
> Noooo... I do not need an extra underscore to make it work on Win32.
> All I want to know is if the following modification can possibly
> break things on a platform other than Win32 and Linux/x86:
> ----------------------------------- 8< -----------------------------------
> --- gnu/gcj/runtime/NameFinder.java     Thu Feb 13 11:09:48 2003
> +++ gnu/gcj/runtime/NameFinder.java     Thu Feb 13 11:10:26 2003
> @@ -115,5 +115,5 @@
>        try
>         {
> -         String[] exec = new String[] {"c++filt", "-s", "java"};
> +         String[] exec = new String[] {"c++filt", "-n", "-s", "java"};
>           cppfilt = runtime.exec(exec);
>           cppfiltIn = new BufferedReader
> ----------------------------------- 8< -----------------------------------
>
> It *should not*, but I cannot be sure and hence this query.
>
> The reasoning goes something like "...*if* the platform adds an underscore
> to emitted symbols, then addr2line would have stripped it out and hence
> c++filt need not".
>
> This logic would break if leading underscores are emitted, but addr2line
> doesn't strip them and yet c++filt needs to strip them before demangling.
> Is there a GCC/binutils supported platform like this?
>
> Ranjit.
>



More information about the Java mailing list