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

Plwp_getxregs, Plwp_setxregs
get and set extended register state

Process Control Library (libproc, -lproc)

#include <libproc.h>

int
Plwp_getxregs(struct ps_prochandle *P, lwpid_t lwpid, prxregset_t *xregs);

int
Plwp_setxregs(struct ps_prochandle *P, lwpid_t lwpid, const prxregset_t *xregs);

The Plwp_getxregs() and Plwp_setxregs() functions get and set the extended register state of the thread lwpid in the process handle P.

The extended register state is defined by the architecture. These registers may refer to optional registers that have become common on the platform, but are not part of the standard ABI and thus not covered by functions such as Plwp_getregs(3PROC) and Plwp_getfpregs(3PROC).

The Plwp_getxregs() function gets the extended register state information and places it into xregs. Where as the Plwp_setxregs() function sets the extended register state information in xregs for the process handle P.

Processes must be stopped prior to obtaining the register state of individual threads. Processes may be stopped with Pstop(3PROC).

The prxregset_t structure is described in proc(5).

One may not set the register values of a process that is not an active process, e.g. a process handle that refers to a file or a core file.

Upon successful completion, the Plwp_getxregs() and Plwp_setxregs() functions return 0 and get or set the register state. Otherwise, -1 is returned and errno is set to indicate the error.

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

The Plwp_getxregs() and Plwp_setxregs() function will fail if:

The process handle P does not have any extended register state information.
The process handle P refers to a live process and it is not stopped.
The process handle P refers to a live process and there is no thread with id lwpid.
The process handle P refers to a core file and there is no thread with id lwpid.

The Plwp_getxregs() and Plwp_setxregs() functions are only available on SPARC platforms.

Uncommitted

See LOCKING in libproc(3LIB).

libproc(3LIB), Plwp_getfpregs(3PROC), Plwp_getregs(3PROC), Plwp_setfpregs(3PROC), Plwp_setregs(3PROC), Pstop(3PROC), proc(5)
May 11, 2016 OmniOS