]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/3/proc
acid(1), proc(3): document watchpoints
[plan9front.git] / sys / man / 3 / proc
index a97a5449ee79fb965b5105f860d370043423f6b3..283071f713239147592d4dd722434a8530727b8d 100644 (file)
@@ -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