struct not shown in debugger [message #1006073] |
Tue, 29 January 2013 17:53 |
Tegiri Nenashi Messages: 2 Registered: January 2013 |
Junior Member |
|
|
I'm using Eclipse CDT + MinGW, and Debugger has trouble drilling down into C structures. For example I have defined
typedef struct term * Term; /* Term is a pointer to a term struct */
struct term {
int private_symbol; /* const/func/pred/var symbol ID */
unsigned char arity; /* number of auguments */
FLAGS_TYPE private_flags; /* for marking terms in various ways */
Term *args; /* array (size arity) of pointers to args */
void *container; /* containing object */
union {
unsigned id; /* unique ID, probably for FPA indexing */
void *vp; /* auxiliary pointer */
} u;
};
and when debugger stopped in the stack frame of
BOOL is_term(Term t, char *str, int arity)
{
return t != NULL && is_symbol(SYMNUM(t), str, arity);
} /* is_term */
the t in the variables panel is not expandable:
Name : t
Details:0xf33248
Default:0xf33248
Decimal:{...}
Hex:{...}
Binary:{...}
Octal:{...}
[Updated on: Tue, 29 January 2013 21:25] Report message to a moderator
|
|
|
|
Re: struct not shown in debugger [message #1006120 is a reply to message #1006105] |
Wed, 30 January 2013 02:39 |
Tegiri Nenashi Messages: 2 Registered: January 2013 |
Junior Member |
|
|
A similar question has been asked at stackoverflow:
"Eclipse CDT and GDB debugging. Value of struct members"
However, my symptoms are different: The structure is declared in header file, so it can't be opaque pointer.
Also I paid almost no attention to 32-64 bit issue, i.e. which items on the toolchain are which size. Or I would just get linkage error, and being unable to run it at all? It seems that if I can see some structures, while not others then it's a bug?
[Updated on: Wed, 30 January 2013 03:31] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03518 seconds