Watchpoints on linux
By Roland Westrelin on Jul 09, 2009
This proved useful to debug a memory corruption on linux/amd64. I had to adapt it to 64bit: the USER_DR constants are 32bit specific. I found that #including <sys/user.h> and then using offsets of the form offsetof(struct user, u_debugreg) instead of USER_DR0 is all it takes.