Padding and alignment of C structs

Q: How to debug padding and alignment issues of C struct? A: gdb --silent --batch -ex 'ptype /o struct my_t' some.o