We\'re working on a C program compiled with arm-eabi-gcc under Linux.
We\'re using a dump of a large structure and we\'re having problems determining at which adress we
For anyone reading this years later, maybe following a search engine result: Since gdb 8.1, its builtin ptype
command has the /o
flag for this.
It will print offset and size of MyType's members and also "holes" (padding), like:
(gdb) ptype /o MyType
/* offset | size */ type = class MyType {
/* 0 | 4 */ int foo;
/* XXX 4-byte hole */
/* 8 | 8 */ void* ptr;
/* total size (bytes): 16 */
}