Using the GDB machine interface, is there a way to get the base type for a specific variable? For example, if I have a variable whose type is a uint32_t (from types.h) is there a way to get GDB to tell me that either that variable's basic type is an unsigned long int, or alternatively, that uint32_t is typedef'ed to an unsigned long int?
You can use "whatis" command
suppose you have
typedef unsigned char BYTE;
BYTE var;
(gdb)whatis var
type = BYTE
(gdb)whatis BYTE
BYTE = unsigned char
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With