【发布时间】:2008-12-31 22:29:06
【问题描述】:
在浏览我的编译器的各种选项开关时(我的组织针对我的给定硬件配置支持 GNU C++ 3.2.3),我遇到了这个问题:
-glevel
:
Level 3 includes extra information, such as all the macro definitions
present in the program. Some debuggers support macro expansion when
you use -g3.
我用几个宏编译了一个测试程序(例如一个循环,一个参数上的 if-then-else),然后在编译的代码上尝试了商业调试器 TotalView 和 GDB -g3。我没有看到任何区别(宏没有扩展到它们的原始代码,我无法“进入”宏等)。
这里有人有在 GNU 编译器上使用 -g3 获得额外调试“功能”的经验吗?
【问题讨论】: