How do I print a #defined constant in GDB?

help macro

You must compile with the -g3 flag for it to work and start your program before the macros are loaded.

In your case:

info macro CONST

or

macro expand CONST

More info: http://sourceware.org/gdb/current/onlinedocs/gdb/Macros.html

Leave a Comment