1 PSETWAPT(3PROC)        Process Control Library Functions       PSETWAPT(3PROC)
   2 
   3 NAME
   4      Psetwapt - set a watchpoint in a process
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Psetwapt(struct ps_prochandle *P, const prwatch_t *wp);
  14 
  15 DESCRIPTION
  16      The Psetwapt() function adds a watchpoint to the process handle P.
  17      Allowing the hardware to generate a trap when the specified area is
  18      accessed.  The watchpoint's parameters are described in wp.  For more
  19      information on watchpoints and the prwatch_t structure, see the PCWATCH
  20      section in proc(4).  The watched area will persist until a subsequent
  21      call to Pdelwapt(3PROC).
  22 
  23      Note, only active processes support watchpoints.  It is an error to call
  24      this function on process handles that correspond to core files, zombie
  25      processes, or files.
  26 
  27 RETURN VALUES
  28      Upon successful completion, the Psetwapt() function returns 0 and
  29      installs the watchpoint in P.  Otherwise, -1 is returned and errno is
  30      set.
  31 
  32 ERRORS
  33      For a full list of possible errors see the DIAGNOSTICS section in
  34      proc(4).
  35 
  36      The Psetwapt() function will fail if:
  37 
  38      ENOENT             P does not refer to an active process.
  39 
  40 INTERFACE STABILITY
  41      Uncommitted
  42 
  43 MT-LEVEL
  44      See LOCKING in libproc(3LIB).
  45 
  46 SEE ALSO
  47      libproc(3LIB), Pdelwapt(3PROC), proc(4)
  48 
  49 illumos                          May 11, 2016                          illumos