如何检查程序是否使用调试符号编译?
问题描述:
我想在GIMP中跟踪一些代码,因此需要启用调试符号的GIMP。我不记得我是否在编译期间启用了它们。
I'd like to trace some code in GIMP and therefore need GIMP with debug symbols enabled. I don't remember whether I have enabled them during compilation. How to check that without recompiling the program?
答
可以使用文件
和 objdump
。特别是,你可以看看文件是剥离还是未剥离,以及 objdump --syms
输出有用的东西(对我来说, for a regular build)。
You can use file
and objdump
on Linux. In particular, you can look at whether file says "stripped" or "not stripped", and whether objdump --syms
outputs anything useful (for me, it says "no symbols" for a regular build).