This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
problem seeing arrays in structs
- From: Lester Ingber <ingber at ingber dot com>
- To: insight at sources dot redhat dot com
- Date: Mon, 10 May 2004 07:14:26 -0700
- Subject: problem seeing arrays in structs
I'm having a problem trying to seeing arrays in structs in simple C code
under Cygwin, compiled with or without -mno-cygwin.
For example, I might have a struct
typedef struct {
double *myarray;
} MYSTRUCT;
In main() I create memory for mystruct,
MYSTRUCT *mystruct;
and I crate memory and stored info for *array, say of dimension 3.
I then pass mystruct to myfunction,
void myfunction (MYSTRUCT *mystruct) {...}
I set a breakpoint under insight to view the Local Variables in
myfunction(). I can see all variables in mystruct that are not arrays,
but for arrays like myarray[], I only see the pointer defined. I also
can see all the info in arrays local to myfunction().
I hope I've conveyed the problem in this simple description.
Thanks.
Lester