> ok.
> i've created a new OS3.5 stationary project, C++ App.
>
> this is my PilotMain:
>
> UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
> {
>
> UInt32 a;
> UInt32 b;
>
> a=10;
> b=20;
>
> return StarterPalmMain(cmd, cmdPBP, launchFlags);
> }
>
> the only modifications to the project are the 4 lines with the a and b
> variables.
>
> when single stepping through the code, the assignment 'a=10'
> also sets b to
> 10, and the next assignment 'b=20' also sets a to 20 (after
> each assignment,
> the a AND b variable are in red in the var window, and with
> same value)..
It's called register coloring -- the compiler sees that in your code a and b
are never used in the same line, so it uses the same register to hold both
variables. Set your optimizations to level 0, and you will see the expected
information in the debugger pane.
-hkmlt
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/