STM32 and GDB - Watchpoint
If the source code was compiled so that it could be easily debugged (typically the switch -g) then you can just call in your GDB client: 

watch x


Where x is the variable in your code you want to watch. Although its highly likely that it might not be supported by your GDB client for you microcontroller.