summaryrefslogtreecommitdiff
path: root/microkernel/mach/gnumach/debugging.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'microkernel/mach/gnumach/debugging.mdwn')
-rw-r--r--microkernel/mach/gnumach/debugging.mdwn5
1 files changed, 4 insertions, 1 deletions
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn
index a5daf4f1..c14f6111 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