views:

361

answers:

2

Which tools do you guys use? How do demangle c++ symbols do be able to pass it to profiler tools, such as opannotate?

Thanks

+14  A: 

Use nm to see all symbols and c++filt to demangle.

Example:

nm -an foo | c++filt
Dan Moulding
unless the binary was stripped
Gaetano Mendola
In the case of a stripped binary, you can always try gazing into a crystal ball.
Dan Moulding
The -C|--demangle[=style] should take care of c++filt's part:nm -anC foo
Eugen Constantin Dinca
A: 

The profiling tool I use already knows the symbols and source code, since it is just the debugger. I can build the app with symbols included, even with full optimization.

Mike Dunlavey