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

NAME


Psetwapt - set a watchpoint in a process

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

int
Psetwapt(struct ps_prochandle *P, const prwatch_t *wp);

DESCRIPTION


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.

RETURN VALUES


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

ERRORS


For a full list of possible errors see the DIAGNOSTICS section in proc(4).

The Psetwapt() function will fail if:

ENOENT P does not refer to an active process.

INTERFACE STABILITY


Uncommitted

MT-LEVEL
See LOCKING in libproc(3LIB).

SEE ALSO


libproc(3LIB), Pdelwapt(3PROC), proc(4)

illumos May 11, 2016 illumos