> Debugging is working OK on my Win2000 system with POSE 3.0a4 and CW 4.0.1
> build 436. However, there are a bunch of irritating bugs:
>
> 1. When attempting to clear a breakpoint during debugging I often get
> Unknown Error Code: 0x021c. Is there any way around this bug?
This is a known bug in the debugger only in Palm OS 3.5. It's been fixed in
an internal build. But we are trying to get the Win 2000 bug nailed down
before releasing it.
> 2. After debugging, I usually need to exit CW and restart it before I can
> debug again. Is there any way around this?
Yup, this is the Win 2000 bug. We apologize for the inconvenience, but this
has been one tough bug to nail down.
> 3. I added the following code to help me debug something:
>
> // macy debug
> int Test1 = sizeof(CCompressedRec);
> int Test2 = (int) pNext;
> int Test3 = (int) &m_Text;
> int Test4 = pNext - m_Text;
> int Test5 = (sizeof(CCompressedRec) - CPERTEXT + (pNext - m_Text));
>
> return(sizeof(CCompressedRec) - CPERTEXT + (pNext - m_Text));
>
> and I found that Test1 through Test5 were always set to the same value.
> That is, when Test1 changed, so did all the others. I imagine that this
is
> due to optimization and the fact that those variables aren't used. Or is
it
> a bug? Any way around this?
This is a compiler optimization called 'register coloring' in which a single
register is used to hold the value of more than one variable if those
variables are never used in the same statement. It will help improve
performance. You can either turn it off by turning off all optimizations, or
adding this #pragma to your source at the top:
#pragma register_coloring off
BTW, in general when debugging, you should turn off all optimizations.
Rgds,
Jun-Kiat Lam
Metrowerks Technical Support
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html