2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
22 .Nd set and get a register from a stopped process or thread
28 .Fa "struct ps_prochandle *P"
34 .Fa "struct ps_prochandle *P"
40 .Fa "struct ps_lwphandle *L"
46 .Fa "struct ps_lwphandle *L"
55 functions read and update the registers of the process handle referred
58 The getting and setting of registers of the process operates on the
59 representative thread (LWP).
60 For more information on how the representative is chosen, see
63 To change the registers of a specific thread, use the
69 The getting and setting of registers only applies to stopped processes.
70 In addition, one may obtain registers from core files, but not set them.
71 To stop a process, see the
75 The register to get or set is indicated by the
78 For a list of registers, see
80 The set of registers is specific to each architecture of the system.
83 function will fill in the value of
85 with the value of the register
89 function will update the value of the register
93 Updated registers will be set when the process resumes execution.
99 functions are equivalent to the
103 functions, except rather than operating on the process and its
104 representative thread, they instead operate on the thread handle
107 Upon successful completion, the
117 is set, and no registers will have been gotten or updated.
123 functions will fail if:
129 This means it is less than
135 value varies based on process architecture.
139 is neither stopped nor a core file.
143 refers to a file obtained through
144 .Xr Pgrab_file 3PROC .
151 functions will fail if:
157 This means it is less than
163 value varies based on process architecture.
167 is not stopped or refers to a non-active process.
169 .Sh INTERFACE STABILITY
180 .Xr Pgrab_file 3PROC ,