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?
have u tried "sizeof"?
the complier may do the byte alignment automatically by default,so this size may be greater than you think
These should all work in GDB (assuming you compiled with -g):
-g
print sizeof(var) print sizeof(Type)