根据主题.
我有一些常数定义如下:
#define CONST 40
我在程序中设置了断点.如何打印该常量的值?(我知道我可以只看源代码,但我想确定一下)
根据主题.
我有一些常数定义如下:
#define CONST 40
我在程序中设置了断点.如何打印该常量的值?(我知道我可以只看源代码,但我想确定一下)
help macro
在加载宏之前,必须使用-g3标志进行编译,以使其工作并启动程序.
在您的 case 中:
info macro CONST
或
macro expand CONST
M或e info: http://sourceware.或g/gdb/current/onlinedocs/gdb/Macros.html