PLWP_GETREGS(3PROC) Process Control Library Functions PLWP_GETREGS(3PROC) NNAAMMEE PPllwwpp__ggeettffpprreeggss, PPllwwpp__sseettffpprreeggss, PPllwwpp__ggeettrreeggss, PPllwwpp__sseettrreeggss - get and set thread registers LLIIBBRRAARRYY Process Control Library (libproc, -lproc) SSYYNNOOPPSSIISS ##iinncclluuddee <> _i_n_t PPllwwpp__ggeettffpprreeggss(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _l_w_p_i_d___t _l_w_p_i_d, _p_r_f_p_r_e_g_s_e_t___t _*_f_p_r_e_g_s); _i_n_t PPllwwpp__sseettffpprreeggss(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _l_w_p_i_d___t _l_w_p_i_d, _c_o_n_s_t _p_r_f_p_r_e_g_s_e_t___t _f_p_r_e_g_s); _i_n_t PPllwwpp__ggeettrreeggss(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _l_w_p_i_d___t _l_w_p_i_d, _p_r_p_r_e_g_s_e_t___t _*_g_r_e_g_s); _i_n_t PPllwwpp__sseettrreeggss(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _l_w_p_i_d___t _l_w_p_i_d, _c_o_n_s_t _p_r_p_r_e_g_s_e_t___t _g_r_e_g_s); DDEESSCCRRIIPPTTIIOONN The PPllwwpp__ggeettrreeggss(), PPllwwpp__sseettrreeggss(), PPllwwpp__ggeettffpprreeggss(), and PPllwwpp__sseettffpprreeggss() functions allow one to get and set the general purpose and floating point registers from the thread _l_w_p_i_d in the process handle _P. The PPllwwpp__ggeettffpprreeggss() function updates the structure pointed to by _f_p_r_e_g_s with the state and values of the floating point registers of the thread specified by _l_w_p_i_d. The PPllwwpp__sseettffpprreeggss() function updates the floating point registers of the thread specified by _l_w_p_i_d to the register state contained in _f_p_r_e_g_s. The PPllwwpp__ggeettrreeggss() function updates the structure pointed to by _g_r_e_g_s with the state and values of the general purpose registers of the thread specified by _l_w_p_i_d_. The PPllwwpp__sseettrreeggss() function updates the general purpose registers of the thread specified by _l_w_p_i_d to the register state contained in _g_r_e_g_s. Processes must be stopped before obtaining the register state of individual threads. Processes may be stopped with Pstop(3PROC). The structures used for registers are described in proc(4) and their defintions may be found in <_s_y_s_/_r_e_g_s_e_t_._h>. The definitions of these structures varies based on the architecture of the system and the running process. 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. RREETTUURRNN VVAALLUUEESS Upon successful completion, the PPllwwpp__ggeettrreeggss(), PPllwwpp__sseettrreeggss(), PPllwwpp__ggeettffpprreeggss(), and PPllwwpp__sseettffpprreeggss() functions return 00 and obtain or set the register state. Otherwise, --11 is returned, eerrrrnnoo is set to indicate the error, and the register state is not updated nor are the data pointers changed. EERRRROORRSS For a full list of possible errors also see the DDIIAAGGNNOOSSTTIICCSS section in proc(4). The PPllwwpp__ggeettrreeggss(), PPllwwpp__sseettrreeggss(), PPllwwpp__ggeettffpprreeggss(), and PPllwwpp__sseettffpprreeggss() will fail if: EBUSY The process handle _P is not currently stopped. ENOENT There is no thread in _P with id _l_w_p_i_d. IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY UUnnccoommmmiitttteedd MMTT--LLEEVVEELL See LLOOCCKKIINNGG in libproc(3LIB). SSEEEE AALLSSOO libproc(3LIB), proc(4) illumos May 11, 2016 illumos