(gdb) print (int)&((struct A*)0)->a
Above command can be used to find structure member offset
For example your structure is
struct node {
int a;
char b;
short c;
};
If you want to find relative offset of char b then you need to run
(gdb) print (int)&((struct A*)0)->b
$2 = 4