While reading this documentation,
I did not spot the difference between a software and a hardware watchpoint. I read that a software breakpoint (not watchpoint) replaces an instruction by an incorrect instruction to trigger an interrupt (and then stop the program), and that hardware breakpoint put the address of the instruction to stop at in a register and compares it to each executed instruction.
However, I am reading in the documentation of watchpoints that "GDB does software watchpoint in by single-stepping your program and testing the variable's value each time", which is basically the definition of a hardware watchpoint to my understanding.
Does someone have a better understanding of the difference between software and hardware watchpoint ?