2 .\" Copyright (c) 2007 by 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 PROC_SERVICE 3PROC "Oct 12, 2007"
8 proc_service \- process service interfaces
12 #include <proc_service.h>
14 \fBps_err_e\fR \fBps_pdmodel\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
15 \fBint *\fR\fIdata_model\fR);
20 \fBps_err_e\fR \fBps_pglobal_lookup\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
21 \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
22 \fBpsaddr_t *\fR\fIsym_addr\fR);
27 \fBps_err_e\fR \fBps_pglobal_sym\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
28 \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
29 \fBps_sym_t *\fR\fIsym\fR);
34 \fBps_err_e\fR \fBps_pread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
35 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
40 \fBps_err_e\fR \fBps_pwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
41 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
46 \fBps_err_e\fR \fBps_pdread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
47 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
52 \fBps_err_e\fR \fBps_pdwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
53 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
58 \fBps_err_e\fR \fBps_ptread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
59 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
64 \fBps_err_e\fR \fBps_ptwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
65 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
70 \fBps_err_e\fR \fBps_pstop\fR(\fBstruct ps_prochandle *\fR\fIph\fR);
75 \fBps_err_e\fR \fBps_pcontinue\fR(\fBstruct ps_prochandle *\fR\fIph\fR);
80 \fBps_err_e\fR \fBps_lstop\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR);
85 \fBps_err_e\fR \fBps_lcontinue\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR);
90 \fBps_err_e\fR \fBps_lgetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
91 \fBprgregset_t\fR \fIgregset\fR);
96 \fBps_err_e\fR \fBps_lsetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
97 \fBconst prgregset_t\fR \fIgregset\fR);
102 \fBps_err_e\fR \fBps_lgetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
103 \fBprfpregset_t *\fR\fIfpregset\fR);
108 \fBps_err_e\fR \fBps_lsetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
109 \fBconst prfpregset_t *\fR\fIfpregset\fR);
114 \fBps_err_e\fR \fBps_pauxv\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
115 \fBconst auxv_t **\fR\fIauxp\fR);
120 \fBps_err_e\fR \fBps_kill\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBint\fR \fIsig\fR);
125 \fBps_err_e\fR \fBps_lrolltoaddr\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
126 \fBlwpid_t\fR \fIlwpid\fR, \fBpsaddr_t\fR \fIgo_addr\fR, \fBpsaddr_t\fR \fIstop_addr\fR);
131 \fBvoid\fR \fBps_plog\fR(\fBconst char *\fR\fIfmt\fR);
137 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
138 \fBlwpid_t\fR \fIlwpid\fR, \fBint *\fR\fIxregsize\fR);
143 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
144 \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
149 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
150 \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
156 \fBps_err_e\fR \fBps_lgetLDT\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
157 \fBstruct ssd *\fR\fIldt\fR);
162 Every program that links \fBlibthread_db\fR or \fBlibrtld_db\fR must provide a
163 set of process control primitives that allow \fBlibthread_db\fR and
164 \fBlibrtld_db\fR to access memory and registers in the target process, to start
165 and to stop the target process, and to look up symbols in the target process.
166 See \fBlibc_db\fR(3LIB). For information on \fBlibrtld_db\fR, refer to the
167 \fILinker and Libraries Guide\fR.
170 Refer to the individual reference manual pages that describe these routines for
171 a functional specification that clients of \fBlibthread_db\fR and
172 \fBlibrtld_db\fR can use to implement this required interface. The
173 <\fBproc_service.h\fR> header lists the C declarations of these routines.
177 \fB\fBps_pdmodel()\fR\fR
180 Returns the data model of the target process.
186 \fB\fBps_pglobal_lookup()\fR\fR
189 Looks up the symbol in the symbol table of the load object in the target
190 process and returns its address.
196 \fB\fBps_pglobal_sym()\fR\fR
199 Looks up the symbol in the symbol table of the load object in the target
200 process and returns its symbol table entry.
206 \fB\fBps_pread()\fR\fR
209 Copies \fIsize\fR bytes from the target process to the controlling process.
215 \fB\fBps_pwrite()\fR\fR
218 Copies \fIsize\fR bytes from the controlling process to the target process.
224 \fB\fBps_pdread()\fR\fR
227 Identical to \fBps_pread()\fR.
233 \fB\fBps_pdwrite()\fR\fR
236 Identical to \fBps_pwrite()\fR.
242 \fB\fBps_ptread()\fR\fR
245 Identical to \fBps_pread()\fR.
251 \fB\fBps_ptwrite()\fR\fR
254 Identical to \fBps_pwrite()\fR.
260 \fB\fBps_pstop()\fR\fR
263 Stops the target process.
269 \fB\fBps_pcontinue()\fR\fR
272 Resumes target process.
278 \fB\fBps_lstop()\fR\fR
281 Stops a single lightweight process ( \fBLWP\fR ) within the target process.
287 \fB\fBps_lcontinue()\fR\fR
290 Resumes a single \fBLWP\fR within the target process.
296 \fB\fBps_lgetregs()\fR\fR
299 Gets the general registers of the \fBLWP\fR.
305 \fB\fBps_lsetregs()\fR\fR
308 Sets the general registers of the \fBLWP\fR.
314 \fB\fBps_lgetfpregs()\fR\fR
317 Gets the \fBLWP`s\fR floating point register set.
323 \fB\fBps_lsetfpregs()\fR\fR
326 Sets the \fBLWP`s\fR floating point register set.
332 \fB\fBps_pauxv()\fR\fR
335 Returns a pointer to a read-only copy of the auxiliary vector of the target
342 \fB\fBps_kill()\fR\fR
345 Sends signal to target process.
351 \fB\fBps_lrolltoaddr()\fR\fR
354 Rolls the \fBLWP\fR out of a critical section when the process is stopped.
360 \fB\fBps_plog()\fR\fR
369 \fB\fBps_lgetxregsize()\fR\fR
372 Returns the size of the architecture-dependent extra state registers.
378 \fB\fBps_lgetxregs()\fR\fR
381 Gets the extra state registers of the \fBLWP\fR.
387 \fB\fBps_lsetxregs()\fR\fR
390 Sets the extra state registers of the \fBLWP\fR.
396 \fB\fBps_lgetLDT()\fR\fR
399 Reads the local descriptor table of the \fBLWP\fR.
404 See \fBattributes\fR(5) for description of the following attributes:
412 ATTRIBUTE TYPE ATTRIBUTE VALUE
419 \fBlibc_db\fR(3LIB), \fBlibrtld_db\fR(3LIB), \fBps_pread\fR(3PROC),
420 \fBrtld_db\fR(3EXT), \fBattributes\fR(5)
423 \fILinker and Libraries Guide\fR