Once upon a time, a VAX debugger informed me 'Variable has been optimized away' when I tried to print it. Have you got any level of optimization turned on? Inside the loop the value of flags is constant, it smells like not only has the compiler unrolled some of the loop it's unloaded some of your variables in the process. For debugging you should turn off all optimisations for a true WYSIWYT (...typed!) epxerience.

On Sunday, January 19, 2003, at 10:41 PM, David Beers wrote:


UInt16 flags; <--This is the variable that is missing in the debugger
char *p;

record->status = packed->status;
flags = packed->flags.allBits;
p = &packed->firstField;

for (index = 0; index < NeslFieldCount; index++)
{
if (GetBitMacro(flags, index) != 0)
{
record->fields[index] = p;
p += StrLen(p) + 1;
}
else
{
record->fields[index] = NULL;
}
}
}


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to