# STM32 and GDB - Watchpoint

I'm reading the book http://www.cs.indiana.edu/~geobrown/book.pdf and I have a question regarding the Exercise 3.1.2 on page 50.

It ask to set a watchpoint on i. I set a watchpoint but it never break the code. I tried breakpoint a function as the book said and it worked.

It is related to tool stlink?

thanks :)

• It may be that this does not work; watchpoints are tricky to support, extremely so if the variable is not declared volatile. There are almost always alternative techniques you can employ with a little creative thinking. – Chris Stratton Mar 28 '13 at 16:48

watch x