Go to main content

man pages section 3: Extended Library Functions, Volume 3

Exit Print View

Updated: July 2017
 
 

ps_lsetfpregs(3PROC)

Name

ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs, ps_lgetcxregsize, ps_lgetcxregs, ps_lsetcxregs - routines that access the target process register in libthread_db

Synopsis

#include <proc_service.h>

ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid,
     prgregset_t gregset);
ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid,
     static prgregset_t gregset);
ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid,
     prfpregset_t *fpregs);
ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid,
     static prfpregset_t *fpregs);
ps_err_e ps_lgetxregsize(struct ps_prochandle *ph, lwpid_t lid,
     int *xregsize);
ps_err_e ps_lgetxregs(struct ps_prochandle *ph, lwpid_t lid,
     caddr_t xregset);
ps_err_e ps_lsetxregs(struct ps_prochandle *ph, lwpid_t lid,
     caddr_t xregset);
ps_err_e ps_lgetcxregsize(struct ps_prochandle *ph, lwpid_t lid,
     int *cxregsize);
ps_err_e ps_lgetcxregs(struct ps_prochandle *ph, lwpid_t lid,
     caddr_t cxregset);
ps_err_e ps_lsetcxregs(struct ps_prochandle *ph, lwpid_t lid,
     caddr_t cxregset);

Description

ps_lgetregs(), ps_lsetregs(), ps_lgetfpregs(), ps_lsetfpregs(), ps_lgetxregsize(), ps_lgetxregs(), ps_lsetxregs(), ps_lgetcxregsize(), ps_lgetcxregs(), and ps_lsetcxregs() read and write register sets from lightweight processes (LWPs) within the target process identified by ph. ps_lgetregs() gets the general registers of the LWP identified by lid, and ps_lsetregs() sets them. ps_lgetfpregs() gets the LWP's floating point register set, while ps_lsetfpregs() sets it.

ps_lgetxregsize(), ps_lgetxregs(), and ps_lsetxregs() are system-dependent. ps_lgetxregsize() returns in *xregsize the size of the architecture-dependent extra state registers. ps_lgetxregs () gets the extra state registers, and ps_lsetxregs() sets them. On systems that do not support extra state registers, these functions will return PS_NOXREGS.

ps_lgetcxregsize(), ps_lgetcxregs(), and ps_lsetcxregs() are system-dependent functions that handle CPU-specific extended registers. ps_lgetcxregsize returns in *cxregsize the size of CPU-specific extended registers. ps_lgetxregs() gets CPU extended registers, and ps_lsetxregs() sets them. On systems that do not support extended registers, these functions will return PS_NOCXREGS.

Return Values

PS_OK

The call returned successfully.

PS_NOFPREGS

Floating point registers are neither available for this architecture nor for this process.

PS_NOXREGS

Extra state registers are not available on this system.

PS_NOCXREGS

Extended registers are not available on this system.

PS_ERR

The function did not return successfully.

Attributes

See attributes(5) for description of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
MT Level
Safe

See Also

libc_db(3LIB), proc_service(3PROC), attributes(5), threads(5)