Merge commit 'dc97a43d4a70c8773a619f11b95b07a787f6f5b7' into merges
[unleashed.git] / share / man / man3proc / ps_lgetregs.3proc
blob2ae19d7ff496ae12e7bfd8ce022ec8169993affb
1 '\" te
2 .\"  Copyright (c) 1998 Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PS_LGETREGS 3PROC "Jan 30, 1998"
7 .SH NAME
8 ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize,
9 ps_lgetxregs, ps_lsetxregs \- routines that access the target process register
10 in libthread_db
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <proc_service.h>
16 \fB ps_err_e\fR \fBps_lgetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
17      \fBprgregset_t\fR \fIgregset\fR);
18 .fi
20 .LP
21 .nf
22 \fBps_err_e\fR \fBps_lsetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
23      \fBstatic prgregset_t\fR \fIgregset\fR);
24 .fi
26 .LP
27 .nf
28 \fBps_err_e\fR \fBps_lgetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
29      \fBprfpregset_t *\fR\fIfpregs\fR);
30 .fi
32 .LP
33 .nf
34 \fBps_err_e\fR \fBps_lsetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
35      \fBstatic prfpregset_t *\fR\fIfpregs\fR);
36 .fi
38 .LP
39 .nf
40 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
41      \fBint *\fR\fIxregsize\fR);
42 .fi
44 .LP
45 .nf
46 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
47      \fBcaddr_t\fR \fIxregset\fR);
48 .fi
50 .LP
51 .nf
52 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
53      \fBcaddr_t\fR \fIxregset\fR);
54 .fi
56 .SH DESCRIPTION
57 .LP
58 \fBps_lgetregs()\fR, \fBps_lsetregs()\fR, \fBps_lgetfpregs()\fR,
59 \fBps_lsetfpregs()\fR, \fBps_lgetxregsize()\fR, \fBps_lgetxregs()\fR,
60 \fBps_lsetxregs()\fR read and write register sets from lightweight processes
61 (\fBLWP\fRs) within the target process identified by \fIph\fR.
62 \fBps_lgetregs()\fR gets the general registers of the \fBLWP\fR identified by
63 \fIlid\fR, and \fBps_lsetregs()\fR sets them. \fBps_lgetfpregs()\fR gets the
64 \fBLWP\fR's floating point register set, while \fBps_lsetfpregs()\fR sets it.
65 .SS "SPARC Only"
66 .LP
67 \fBps_lgetxregsize()\fR,\fBps_lgetxregs()\fR, and\fBps_lsetxregs()\fR are
68 SPARC-specific. They do not need to be defined by a controlling process on
69 non-SPARC architecture. \fBps_lgetxregsize()\fR returns in
70 \fB*\fR\fIxregsize\fR the size of the architecture-dependent extra state
71 registers. \fBps_lgetxregs()\fR gets the extra state registers, and
72 \fBps_lsetxregs()\fR sets them.
73 .SH RETURN VALUES
74 .ne 2
75 .na
76 \fB\fBPS_OK\fR \fR
77 .ad
78 .RS 16n
79 The call returned successfully.
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fB\fBPS_NOFPREGS\fR \fR
86 .ad
87 .RS 16n
88 Floating point registers are neither available for this architecture nor for
89 this process.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fBPS_NOXREGS\fR \fR
96 .ad
97 .RS 16n
98 Extra state registers are not available on this architecture.
99 .RE
102 .ne 2
104 \fB\fBPS_ERR\fR \fR
106 .RS 16n
107 The function did not return successfully.
110 .SH ATTRIBUTES
112 See \fBattributes\fR(5) for description of the following attributes:
117 box;
118 c | c
119 l | l .
120 ATTRIBUTE TYPE  ATTRIBUTE VALUE
122 MT Level        Safe
125 .SH SEE ALSO
127 \fBlibc_db\fR(3LIB), \fBproc_service\fR(3PROC), \fBattributes\fR(5),
128 \fBthreads\fR(5)