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

C++CPerformanceProfilingName Mangling

C++ Problem Overview


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

Thanks

C++ Solutions


Solution 1 - C++

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

Example:

nm -an foo | c++filt

Solution 2 - C++

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionvehomzzzView Question on Stackoverflow
Solution 1 - C++Dan MouldingView Answer on Stackoverflow
Solution 2 - C++Mike DunlaveyView Answer on Stackoverflow