summaryrefslogtreecommitdiff
path: root/microkernel
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-07-06 16:22:19 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-07-06 16:22:22 +0200
commite1950ac15cf03f297253ade4caa69b8733ec396f (patch)
tree7d12504ee4afc3ae970d0c77cdde67d26630a70c /microkernel
parent38522201c47cb2238b4dc5a2c722825badfa9ae9 (diff)
Add programmatic hardware watchpoints documentation
Diffstat (limited to 'microkernel')
-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 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