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

ぐ巨炮叔叔 提交于 2019-12-31 08:05:34

问题


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

Thanks


回答1:


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

Example:

nm -an foo | c++filt



回答2:


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.



来源:https://stackoverflow.com/questions/1379533/how-can-i-see-symbols-of-c-and-c-binary-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!