diff options
author | aiju <devnull@localhost> | 2017-06-12 20:31:04 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2017-06-12 20:31:04 +0000 |
commit | 89f71fa9ed166c06a23937544b453f65fb224456 (patch) | |
tree | 3d5107ead1c85f9c91706f83e62b713f7258d49c | |
parent | fff474d8639fd387aac437e0a84a06604000c3ba (diff) |
acid(1), proc(3): document watchpoints
-rw-r--r-- | sys/man/1/acid | 10 | ||||
-rw-r--r-- | sys/man/3/proc | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sys/man/1/acid b/sys/man/1/acid index ea58777b9..670e65bcd 100644 --- a/sys/man/1/acid +++ b/sys/man/1/acid @@ -252,6 +252,16 @@ Set a breakpoint in the current process at the given address. .BI bpdel( address ) Delete a breakpoint from the current process. .TP +.BI wptab() +List watchpoints set in the current process. +.TP +\fLwpset(\fItype\fL,\fIaddr\fL,\fIlen\fL) +Set a watchpoint for the \fIlen\fR bytes at the given address. +\fItype\fR is \fL"r"\fR, \fL"w"\fR or \fL"rw"\fR to trap read accesses, write accesses or both, respectively. +.TP +.BI wpdel( address ) +Delete all watchpoints set for the given address. +.TP .B cont() Continue execution of current process and wait for it to stop. .TP diff --git a/sys/man/3/proc b/sys/man/3/proc index a97a5449e..283071f71 100644 --- a/sys/man/3/proc +++ b/sys/man/3/proc @@ -251,6 +251,22 @@ and a and .BR /sys/src/cmd/trace.c ). . +.PP +The \fLwatchpt\fR file contains a list of the watchpoints set for the process. +If supported by the hardware, watchpoints can be used to trap accesses to specific addresses. +Each line in the file has the form "\fItype\fR \fIaddress\fR \fIlength\fR", +where \fItype\fR consists of the characters \fLr\fR (read), \fLw\fR (write), \fLx\fR (execute) or \fL-\fR (padding character). +The watchpoint triggers on an access to the \fIlength\fR bytes starting at \fIaddress\fR if the type of the access must match one of the characters in the \fItype\fR field. +.PP +Writing to the file either replaces (offset zero) or adds to (offset non-zero) the list of watchpoints. +Each line written must be terminated by a newline. +If and only if all lines written comply with the (usually rather idiosyncratic) hardware restrictions, the list is updated; otherwise all changes are discarded. +Watchpoints can also be cleared by opening the file with \fLOTRUNC\fR (see +.IR open (2)). +.PP +A triggered watchpoint will deliver a \fLsys: watchpoint\fR note which includes a comma-separated list of the watchpoints that were triggered, where 0 corresponds to the first line in the +.B watchpt +file, 1 to the second and so forth. .SS Control messages Textual messages written to the .B ctl |