Hi, whilst debugging code running on my XC161board i cant seem to modify the locals in the watch window. Does anyone know why this is?
It depends a bit.
All real debuggers should support edit of variables even if stored in registers.
The problem comes when the variable is only used in some part of a function. The compiler may then reuse the register for a different variable in other parts of the function. The result is that the variable goes out of scope for the debugger, even if you still are within the block scope of the source code.
"result is that the variable goes out of scope for the debugger, even if you still are within the block scope of the source code."
That's true, although a truly integrated debugger worthy of the name should be able to cope with it.
The trouble really is that the debugger technology (certainly within uVision) really is a long way behind the compiler technology - especially when it comes to oprimisation.
:-(