vehomzzz
vehomzzz

Reputation: 44598

How can I see symbols of (C and C++) binary on linux?

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

Thanks

Upvotes: 61

Views: 56474

Answers (2)

Dan Moulding
Dan Moulding

Reputation: 220843

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

Example:

nm -an foo | c++filt

Upvotes: 105

Mike Dunlavey
Mike Dunlavey

Reputation: 40679

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.

Upvotes: 0

Related Questions