Watchpoints: Data Breakpoints

Sometimes my embedded application is not doing what I want it to do. I can solve many problems with normal ‘step/stop mode debugging‘: setting breakpoints, step, stop, inspect data, and so on. But not always. If a piece of code is changing a global variable unintentionally, I do not know where to set my breakpoint. Something is changing my variable, and I have no clue from where. It could be a dangling pointer, a stack overflow or something similar which I cannot track down with code breakpoints. What I need is a breakpoint on data: watchpoints!

Continue reading