I've got a weird issue that almost seems like a Visual Studio 2008 issue. I have a C struct definition as follows:
static struct frame {
short typupdt;
char callarg[1+CallSiz];
char *unitarg;
XTime unitage;
XTime orgtime;
XTime newtime;
char oldstat[1+StatSiz];
char newstat[1+StatSiz];
char incdisp[1+DispSiz];
char orgdisp[1+DispSiz];
char clearcod[1+ClearSiz];
char orgclear[1+ClearSiz];
char observd[1+ObsSiz];
char orgobs[1+ObsSiz];
char raddesc[1+Desc1Siz];
char incnum[INVIDLEN];
char agency[1+AgencySiz];
int wlins;
int wcols;
int skipsrch;
struct frame *next;
} *Frame= NULL;
Which should (and seems to) create a new struct
called frame
and a global pointer (to this file) to an instance of that struct
called Frame
. That all seems to work fine in the code itself. However, when I am debugging this code and set a break point somewhere and then examine Frame
in the watch window, the information it reports is completely wrong. It's like it's looking at the correct piece of memory, but its understanding of the definition is incorrect, i.e. the fields it says the struct has are not even close.
At first I thought there was sort of weird namespacing issue or something so I changed the names of both frame
and Frame
, but the issue still existed. Anybody have any idea what is going on? Like I said, the code seems to work, but debugging is pretty much impossible.
Edit: I updated the definition with the real definition, and here's a screenshot of what I see in the watch window:
alt text http://img156.imageshack.us/img156/6943/watchlist.jpg
That Make a lick of sense to anybody? I'm still super stumped.