Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » struct not shown in debugger
struct not shown in debugger [message #1006073] Tue, 29 January 2013 17:53 Go to next message
Tegiri Nenashi is currently offline Tegiri NenashiFriend
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 #1006105 is a reply to message #1006073] Tue, 29 January 2013 22:13 Go to previous messageGo to next message
Jesse Weinstein is currently offline Jesse WeinsteinFriend
Messages: 44
Registered: July 2012
Member
Er, you didn't actually ask a question. Do you think the behavior you observed is a bug? Or is this a feature request? Or do you think the feature exists, and you want a pointer to how to use it?

I'm not personally familiar with the CDT debugger, so I probably can't help you myself, but clarifying what you are asking might make it more likely that someone who could would actually take the time to reply.
Re: struct not shown in debugger [message #1006120 is a reply to message #1006105] Wed, 30 January 2013 02:39 Go to previous message
Tegiri Nenashi is currently offline Tegiri NenashiFriend
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

Previous Topic:Getting Eclipse and Cygwin working
Next Topic:"Building Workspace" dialog doesn't show
Goto Forum:
  


Current Time: Thu Apr 25 07:41:15 GMT 2024

Powered by FUDForum. Page generated in 0.03465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top