Hi all,
FYI I have discovered a partial method of performing what I need using 'debug' (gdb).
Using the ptype -v <struct or typedef> option will display the structure definition. For example:
Basically if you have a type (e.g. DEFS_T), compiled in an object:
4> ptype -v DEFS_T
type = struct __T152236944 { /* off 0 bits, len 1280 bits */
enum DTYPE st_type_e;
/* off 0 bits, len 32 bits */
enum DTYPE type_e;
/* off 32 bits, len 32 bits */
int offset_i;
/* off 64 bits, len 32 bits */
char option_ca[20];
/* off 96 bits, len 160 bits */
int var_len_i;
/* off 256 bits, len 32 bits */
char var_name_ca[30];
/* off 288 bits, len 240 bits */
char init_type_c;
/* off 528 bits, len 8 bits */
enum ITYPE init_var_type_e;
/* off 544 bits, len 32 bits */
char *init_text_cp;
/* off 576 bits, len 32 bits */
short num_init_vals_s;
/* off 608 bits, len 16 bits */
---Type <return> to continue, or q <return> to quit---
long long init_num_ll;
/* off 640 bits, len 64 bits */
char comment_ca[70];
/* off 704 bits, len 560 bits */
}
The only (small?) issue with this is if there are embedded or sub-structs; these have to be displayed separately :(
Cheers.