I\'m using GDB to analyze a core dump of a C program. Is it possible to print the size of a struct in the program?
These should all work in GDB (assuming you compiled with -g):
-g
print sizeof(var) print sizeof(Type)