I'm experiencing difficulties when trying to debug my code using breakpoints.
Sometimes they set, sometimes they won't set at the specific point in the code but rather a few steps on. This isn't too difficult to cope with although I'd like to understand the why as the code isn't at a conditional break or anything - sometimes seems to be the case when just setting some registers sequentially.
Then other times even though the break point seems to set correctly, CW seems to ignore it.
Can anyone help please....?
Do you have the compiler optimizations turned on? If so, the compiler's optimizer will eliminate and reorder instructions, the result being that there is not a one-on-one match between the source code and the generated machine instructions.
---Tom
Hi Tom
Thanks for your reply.
How and where do I check to see whether these options are set...?
Thanks
MW
You would check the compiler settings. What version of CodeWarrior are you using? For the Classic version you look in the Compiler Settings panel, which can be reached by Choosing Edit > Project Settings > Compiler Settings, although I'm recalling that from memory. For the Eclipse-based version it's Project > Properties > C/C++ Build > Settings > Optimization.
---Tom
Hi Tom
I'm using Version 10.1
That's Eclipse, then.
---Tom