Forum Discussion
Altera_Forum
Honored Contributor
16 years agoNios II Eclipse Variable Watchpoint Not Working
I have never been able to get variable watchpoints to work correctly. For example, I have a function something like int run_test() { int retval = 0; if(a) retval = 1;...
Altera_Forum
Honored Contributor
16 years agoData watchpoints won't work on items that the compiler assigns to a register, only on writes to real memory.
Even without the optimiser it is possible that 'retval' doesn't exist as a memory item (or at least the allocated item isn't used. If you move 'retval' outside the function and define it as 'volatile int retval' then the writes are required to be generated and the watchpoint should trap.