Assume I have C code that includes this include file:
struct foo {
int bar;
};
#define FOO ((struct foo*)(0x123))
The program is compiled with -ggdb3
.
When FOO
is used at runtime anywhere, I can use it also in the debugging console. But when it isn't (but the include is included), the macro #define FOO
works, but the unused definition of struct foo
is unknown to gdb:
(gdb) p FOO
No struct type named foo.
(gdb) p FOOx
No symbol "FOOx" in current context.
How can I make gdb include also unused structures in its debugging information?