1 PS_LGETREGS(3PROC) Process Control Library Functions PS_LGETREGS(3PROC) 2 3 NAME 4 ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs, 5 ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs - routines that access the 6 target process register in libthread_db 7 8 SYNOPSIS 9 #include <proc_service.h> 10 11 ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, 12 prgregset_t gregset); 13 14 15 ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, 16 static prgregset_t gregset); 17 18 19 ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, 20 prfpregset_t *fpregs); 21 22 23 ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, 24 static prfpregset_t *fpregs); 25 26 27 ps_err_e ps_lgetxregsize(struct ps_prochandle *ph, lwpid_t lid, 28 int *xregsize); 29 30 31 ps_err_e ps_lgetxregs(struct ps_prochandle *ph, lwpid_t lid, 32 caddr_t xregset); 33 34 35 ps_err_e ps_lsetxregs(struct ps_prochandle *ph, lwpid_t lid, 36 caddr_t xregset); 37 38 39 DESCRIPTION 40 ps_lgetregs(), ps_lsetregs(), ps_lgetfpregs(), ps_lsetfpregs(), 41 ps_lgetxregsize(), ps_lgetxregs(), ps_lsetxregs() read and write 42 register sets from lightweight processes (LWPs) within the target 43 process identified by ph. ps_lgetregs() gets the general registers of 44 the LWP identified by lid, and ps_lsetregs() sets them. ps_lgetfpregs() 45 gets the LWP's floating point register set, while ps_lsetfpregs() sets 46 it. 47 48 ps_lgetxregsize(), ps_lgetxregs(), and ps_lsetxregs() are used to get 49 and set the extended register set. Support for an extended register set 50 depends on the instruction-set archicture. On platforms without support 51 for these, controlling processes wlil still need to define them; 52 however, they are allowed to simply return errors. 53 54 ps_lgetxregsize() returns in *xregsize the size of the architecture- 55 dependent extra state registers. ps_lgetxregs() gets the extra state 56 registers, and ps_lsetxregs() sets them. When getting the registers, 57 the size of xregset must be at least the size returned by 58 ps_lgetxregsize(). 59 60 RETURN VALUES 61 PS_OK 62 The call returned successfully. 63 64 65 PS_NOFREGS 66 Floating point registers are neither available for this 67 architecture nor for this process. 68 69 70 PS_NOXREGS 71 Extra state registers are not available on this 72 architecture. 73 74 75 PS_ERR 76 The function did not return successfully. 77 78 79 ATTRIBUTES 80 See attributes(7) for description of the following attributes: 81 82 83 84 85 +---------------+-----------------+ 86 |ATTRIBUTE TYPE | ATTRIBUTE VALUE | 87 +---------------+-----------------+ 88 |MT Level | Safe | 89 +---------------+-----------------+ 90 91 SEE ALSO 92 libc_db(3LIB), proc_service(3PROC), attributes(7), threads(7) 93 94 January 23, 2023 PS_LGETREGS(3PROC)