When I compile my program with full CW 8.3 optimizations, it crashes when trying to lock a DB record it obtained with a wrong index. This does not occur without optimizations. I tried tracking the problem with the debugger, but nothing makes sense: variables reported in the monitor window barely resemble what they should be, even after going over a line such as index = 0. The CW settings dialogs warns that debugging with optimizations on is going to be harder. What is the best strategy, then?
1) Learn assembly language and debug in mixed mode.
2) Ship with optimizations turned off.
3) Look at possible root causes.
The most common problem with optimized code is assumptions about variables. Variables may be allocated to registers now rather than the stack. Writing past the end of an array may be harmless in debug mode but deadly in release mode.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
