From e1950ac15cf03f297253ade4caa69b8733ec396f Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 6 Jul 2014 16:22:19 +0200 Subject: Add programmatic hardware watchpoints documentation --- microkernel/mach/gnumach/debugging.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'microkernel/mach/gnumach/debugging.mdwn') diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn index cf02471d..c5c592b7 100644 --- a/microkernel/mach/gnumach/debugging.mdwn +++ b/microkernel/mach/gnumach/debugging.mdwn @@ -65,9 +65,12 @@ Another interesting feature is watching a variable, by using watch 0x123400 -and then type continue, to let Mach continue execution. The debugger will be entered again on any change in that variable. The watch is implemented in hardware, so it does not disturb or slow down execution at all. +and then type continue, to let Mach continue execution. The debugger will be entered again on any change in that variable. The watch is implemented in hardware, so it does not disturb or slow down execution at all. The same can be achieved programmatically, e.g. using + struct db_watchpoint watch = { .task = NULL, .loaddr= 0x40e, .hiaddr = 0x40e+2, .link = NULL}; + db_set_hw_watchpoint(&watch, 0); + # GDB in QEMU When you're [[running_a_system_in_QEMU|hurd/running/qemu]] you can directly -- cgit v1.2.3