PSETWAPT(3PROC) Process Control Library Functions PSETWAPT(3PROC)

Psetwapt
set a watchpoint in a process

Process Control Library (libproc, -lproc)

#include <libproc.h>
int
Psetwapt(struct ps_prochandle *P, const prwatch_t *wp);

The Psetwapt() function adds a watchpoint to the process handle P. Allowing the hardware to generate a trap when the specified area is accessed. The watchpoint's parameters are described in wp. For more information on watchpoints and the prwatch_t structure, see the PCWATCH section in proc(4). The watched area will persist until a subsequent call to Pdelwapt(3PROC).
Note, only active processes support watchpoints. It is an error to call this function on process handles that correspond to core files, zombie processes, or files.

Upon successful completion, the Psetwapt() function returns 0 and installs the watchpoint in P. Otherwise, -1 is returned and errno is set.

For a full list of possible errors see the DIAGNOSTICS section in proc(4).
The Psetwapt() function will fail if:
 
 
P does not refer to an active process.

Uncommitted

See LOCKING in libproc(3LIB).

libproc(3LIB), Pdelwapt(3PROC), proc(4)
May 11, 2016 illumos