> This sort of problem won't produce an error immediately, but will
> cause your code to fail the next time it (or the system) tries to use
> that chunk so it's almost certain that the bug that's causing this
problem
> has already occured by the time you get to this line of code.  Memory
> corruption errors are trouble because they could be *anywhere* in
> the code that has executed up to that point.  The worst I had took
nine
> days to trace so I spend a lot of time coding carefully to try and
avoid
> them.  Of course this is all guesswork since I can't debug your code
> to see what it's doing (and while I'm happy to debug it for you my
rate
> is US$50 an hour).

BTW, the Metrowerks team is able to start talking about some of the
features in the new CodeWarrior for Palm OS V8 release coming next
month.  One of them that would help a lot in situations like this is
watchpoint support.  We worked with Keith to get a single virtual
watchpoint added to POSE 3.3; the CW debugger knows how to set it.  Once
its set, any write the to data being watched will trigger a break into
the debugger.  This can help you find out where a piece of data is being
corrupted -- you see corruption the first time, restart the program,
stopping at a point where the data exists but it hasn't been corrupted,
then set a watchpoint on the item and check every write.

To avoid slowing down the emulation too much, only one watchpoint can be
enabled at a time.  Also, this only works on POSE, not on a real device.
The Dragonball CPUs don't have hardware support for this, so it would be
almost impossible to support this on the device.



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

Reply via email to