> From: [email protected] (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Anglas?=) > Date: Sun, 05 May 2013 20:37:25 +0200 > > Hi, > > the lack of hardware-assisted breakpoints support makes the use of > `watch' painful in gdb. > > Has work already been done on this front? If not, are there particular > reasons that would make it unsuitable / unlikely to be integrated into > base?
No work has been done. > I'm currently trying to see what's needed to implement i386 support. > It *seems* that OpenBSD doesn't know about the debug registers on this > architecture. Right. And adding support to the kernel is a non-trivial task. The hardware debug registers on i386/amd64 only allow for a very limited number breakpoints/watchpoints and has the drawback that it is hardware-specific. A better approach would be to take a page-fault based approach where setting a watchpoint will map the page containing the varible that's being watched read-only and trap if the page is being modified.
