Demangling of method names and addr2line/c++filt

Mark Wielaard mark@klomp.org
Thu Feb 13 09:44:00 GMT 2003


Hi,
On Thu, 2003年02月13日 at 10:09, Andrew Haley wrote:
> Addr2line is broken -- it should do whatever is appropriate to the
> default naming convention on the platform. So, if gcc doesn't need a
> special flag to make it add underscores, addr2line should be able to
> demangle without needing a special flag either.

But we currently don't use addr2line to demangle (since it cannot
demangele java method names on all platforms) so we use the output of
addr2line as input for c++filt (or we give it the result of dladdr). It
seems that both addr2line and c++filt are stripping leading underscore
on some architectures.
So the questions seem to be:
- Does addr2line (or addr2name) and dladdr always strip the leading
underscore on platforms that need it stripped?
If yes, then it seems save to always give a "-n" argument to c++filt.
This would all be a bit simpler if we did the symbol lookup and
demangling inside libgcj itself.
Cheers,
Mark


More information about the Java mailing list

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