gcc 3.1.1, nm -C on solaris8 sparc
Rupert Wood
me@rupey.net
Sun Sep 1 23:28:00 GMT 2002
Mark Crosland wrote:
> We have a tool that uses /usr/ccs/bin/nm -C to get demangled
> c++ symbol names. But it doesn't seem to fully demangle them.
You can use the GNU nm (or objdump) from the binutils package to
demangle g++'s C++ symbols.
However, the GNU nm won't demangle Sun CC's symbols; you'll have to
stick with Sun's nm for that.
If you need both and can't choose the correct nm ahead of time, you
could write a wrapper to run G++ C++ symbols through the cp_demangle
function in libiberty (in the GCC, binutils and gdb source trees amongst
other places). All G++ manglings start '_Z'; but you can find a
definitive spec at
http://www.codesourcery.com/cxx-abi/
Rup.
More information about the Gcc-help
mailing list