Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man3proc/proc_service.3proc
+++ new/usr/src/man/man3proc/proc_service.3proc
1 1 '\" te
2 2 .\" Copyright (c) 2007 by Sun Microsystems, Inc. All Rights Reserved.
3 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 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 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 6 .TH PROC_SERVICE 3PROC "Jan 23, 2023"
7 7 .SH NAME
8 8 proc_service \- process service interfaces
9 9 .SH SYNOPSIS
10 10 .nf
11 11 #include <proc_service.h>
12 12
13 13 \fBps_err_e\fR \fBps_pdmodel\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
14 14 \fBint *\fR\fIdata_model\fR);
15 15 .fi
16 16
17 17 .LP
18 18 .nf
19 19 \fBps_err_e\fR \fBps_pglobal_lookup\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
20 20 \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
21 21 \fBpsaddr_t *\fR\fIsym_addr\fR);
22 22 .fi
23 23
24 24 .LP
25 25 .nf
26 26 \fBps_err_e\fR \fBps_pglobal_sym\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
27 27 \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
28 28 \fBps_sym_t *\fR\fIsym\fR);
29 29 .fi
30 30
31 31 .LP
32 32 .nf
33 33 \fBps_err_e\fR \fBps_pread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
34 34 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
35 35 .fi
36 36
37 37 .LP
38 38 .nf
39 39 \fBps_err_e\fR \fBps_pwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
40 40 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
41 41 .fi
42 42
43 43 .LP
44 44 .nf
45 45 \fBps_err_e\fR \fBps_pdread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
46 46 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
47 47 .fi
48 48
49 49 .LP
50 50 .nf
51 51 \fBps_err_e\fR \fBps_pdwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
52 52 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
53 53 .fi
54 54
55 55 .LP
56 56 .nf
57 57 \fBps_err_e\fR \fBps_ptread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
58 58 \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
59 59 .fi
60 60
61 61 .LP
62 62 .nf
63 63 \fBps_err_e\fR \fBps_ptwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
64 64 \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
65 65 .fi
66 66
67 67 .LP
68 68 .nf
69 69 \fBps_err_e\fR \fBps_pstop\fR(\fBstruct ps_prochandle *\fR\fIph\fR);
70 70 .fi
71 71
72 72 .LP
73 73 .nf
74 74 \fBps_err_e\fR \fBps_pcontinue\fR(\fBstruct ps_prochandle *\fR\fIph\fR);
75 75 .fi
76 76
77 77 .LP
78 78 .nf
79 79 \fBps_err_e\fR \fBps_lstop\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR);
80 80 .fi
81 81
82 82 .LP
83 83 .nf
84 84 \fBps_err_e\fR \fBps_lcontinue\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR);
85 85 .fi
86 86
87 87 .LP
88 88 .nf
89 89 \fBps_err_e\fR \fBps_lgetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
90 90 \fBprgregset_t\fR \fIgregset\fR);
91 91 .fi
92 92
93 93 .LP
94 94 .nf
95 95 \fBps_err_e\fR \fBps_lsetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
96 96 \fBconst prgregset_t\fR \fIgregset\fR);
97 97 .fi
98 98
99 99 .LP
100 100 .nf
101 101 \fBps_err_e\fR \fBps_lgetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
102 102 \fBprfpregset_t *\fR\fIfpregset\fR);
103 103 .fi
104 104
105 105 .LP
106 106 .nf
107 107 \fBps_err_e\fR \fBps_lsetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
108 108 \fBconst prfpregset_t *\fR\fIfpregset\fR);
109 109 .fi
110 110
111 111 .LP
112 112 .nf
113 113 \fBps_err_e\fR \fBps_pauxv\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
114 114 \fBconst auxv_t **\fR\fIauxp\fR);
115 115 .fi
116 116
117 117 .LP
118 118 .nf
119 119 \fBps_err_e\fR \fBps_kill\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBint\fR \fIsig\fR);
120 120 .fi
121 121
122 122 .LP
123 123 .nf
124 124 \fBps_err_e\fR \fBps_lrolltoaddr\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
125 125 \fBlwpid_t\fR \fIlwpid\fR, \fBpsaddr_t\fR \fIgo_addr\fR, \fBpsaddr_t\fR \fIstop_addr\fR);
126 126 .fi
127 127
128 128 .LP
129 129 .nf
130 130 \fBvoid\fR \fBps_plog\fR(\fBconst char *\fR\fIfmt\fR);
131 131 .fi
132 132
133 133 .LP
134 134 .nf
135 135 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
136 136 \fBlwpid_t\fR \fIlwpid\fR, \fBint *\fR\fIxregsize\fR);
137 137 .fi
138 138
139 139 .LP
140 140 .nf
141 141 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
142 142 \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
143 143 .fi
144 144
145 145 .LP
146 146 .nf
147 147 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
148 148 \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
149 149 .fi
150 150
151 151 .SS "x86"
152 152 .nf
153 153 \fBps_err_e\fR \fBps_lgetLDT\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
154 154 \fBstruct ssd *\fR\fIldt\fR);
155 155 .fi
156 156
157 157 .SH DESCRIPTION
158 158 Every program that links \fBlibthread_db\fR or \fBlibrtld_db\fR must provide a
159 159 set of process control primitives that allow \fBlibthread_db\fR and
160 160 \fBlibrtld_db\fR to access memory and registers in the target process, to start
161 161 and to stop the target process, and to look up symbols in the target process.
162 162 See \fBlibc_db\fR(3LIB). For information on \fBlibrtld_db\fR, refer to the
163 163 \fILinker and Libraries Guide\fR.
164 164 .sp
165 165 .LP
166 166 Refer to the individual reference manual pages that describe these routines for
167 167 a functional specification that clients of \fBlibthread_db\fR and
168 168 \fBlibrtld_db\fR can use to implement this required interface. The
169 169 <\fBproc_service.h\fR> header lists the C declarations of these routines.
170 170 .SH FUNCTIONS
171 171 .ne 2
172 172 .na
173 173 \fB\fBps_pdmodel()\fR\fR
174 174 .ad
175 175 .RS 23n
176 176 Returns the data model of the target process.
177 177 .RE
178 178
179 179 .sp
180 180 .ne 2
181 181 .na
182 182 \fB\fBps_pglobal_lookup()\fR\fR
183 183 .ad
184 184 .RS 23n
185 185 Looks up the symbol in the symbol table of the load object in the target
186 186 process and returns its address.
187 187 .RE
188 188
189 189 .sp
190 190 .ne 2
191 191 .na
192 192 \fB\fBps_pglobal_sym()\fR\fR
193 193 .ad
194 194 .RS 23n
195 195 Looks up the symbol in the symbol table of the load object in the target
196 196 process and returns its symbol table entry.
197 197 .RE
198 198
199 199 .sp
200 200 .ne 2
201 201 .na
202 202 \fB\fBps_pread()\fR\fR
203 203 .ad
204 204 .RS 23n
205 205 Copies \fIsize\fR bytes from the target process to the controlling process.
206 206 .RE
207 207
208 208 .sp
209 209 .ne 2
210 210 .na
211 211 \fB\fBps_pwrite()\fR\fR
212 212 .ad
213 213 .RS 23n
214 214 Copies \fIsize\fR bytes from the controlling process to the target process.
215 215 .RE
216 216
217 217 .sp
218 218 .ne 2
219 219 .na
220 220 \fB\fBps_pdread()\fR\fR
221 221 .ad
222 222 .RS 23n
223 223 Identical to \fBps_pread()\fR.
224 224 .RE
225 225
226 226 .sp
227 227 .ne 2
228 228 .na
229 229 \fB\fBps_pdwrite()\fR\fR
230 230 .ad
231 231 .RS 23n
232 232 Identical to \fBps_pwrite()\fR.
233 233 .RE
234 234
235 235 .sp
236 236 .ne 2
237 237 .na
238 238 \fB\fBps_ptread()\fR\fR
239 239 .ad
240 240 .RS 23n
241 241 Identical to \fBps_pread()\fR.
242 242 .RE
243 243
244 244 .sp
245 245 .ne 2
246 246 .na
247 247 \fB\fBps_ptwrite()\fR\fR
248 248 .ad
249 249 .RS 23n
250 250 Identical to \fBps_pwrite()\fR.
251 251 .RE
252 252
253 253 .sp
254 254 .ne 2
255 255 .na
256 256 \fB\fBps_pstop()\fR\fR
257 257 .ad
258 258 .RS 23n
259 259 Stops the target process.
260 260 .RE
261 261
262 262 .sp
263 263 .ne 2
264 264 .na
265 265 \fB\fBps_pcontinue()\fR\fR
266 266 .ad
267 267 .RS 23n
268 268 Resumes target process.
269 269 .RE
270 270
271 271 .sp
272 272 .ne 2
273 273 .na
274 274 \fB\fBps_lstop()\fR\fR
275 275 .ad
276 276 .RS 23n
277 277 Stops a single lightweight process ( \fBLWP\fR ) within the target process.
278 278 .RE
279 279
280 280 .sp
281 281 .ne 2
282 282 .na
283 283 \fB\fBps_lcontinue()\fR\fR
284 284 .ad
285 285 .RS 23n
286 286 Resumes a single \fBLWP\fR within the target process.
287 287 .RE
288 288
289 289 .sp
290 290 .ne 2
291 291 .na
292 292 \fB\fBps_lgetregs()\fR\fR
293 293 .ad
294 294 .RS 23n
295 295 Gets the general registers of the \fBLWP\fR.
296 296 .RE
297 297
298 298 .sp
299 299 .ne 2
300 300 .na
301 301 \fB\fBps_lsetregs()\fR\fR
302 302 .ad
303 303 .RS 23n
304 304 Sets the general registers of the \fBLWP\fR.
305 305 .RE
306 306
307 307 .sp
308 308 .ne 2
309 309 .na
310 310 \fB\fBps_lgetfpregs()\fR\fR
311 311 .ad
312 312 .RS 23n
313 313 Gets the \fBLWP`s\fR floating point register set.
314 314 .RE
315 315
316 316 .sp
317 317 .ne 2
318 318 .na
319 319 \fB\fBps_lsetfpregs()\fR\fR
320 320 .ad
321 321 .RS 23n
322 322 Sets the \fBLWP`s\fR floating point register set.
323 323 .RE
324 324
325 325 .sp
326 326 .ne 2
327 327 .na
328 328 \fB\fBps_pauxv()\fR\fR
329 329 .ad
330 330 .RS 23n
331 331 Returns a pointer to a read-only copy of the auxiliary vector of the target
332 332 process.
333 333 .RE
334 334
335 335 .sp
336 336 .ne 2
337 337 .na
338 338 \fB\fBps_kill()\fR\fR
339 339 .ad
340 340 .RS 23n
341 341 Sends signal to target process.
342 342 .RE
343 343
344 344 .sp
345 345 .ne 2
346 346 .na
347 347 \fB\fBps_lrolltoaddr()\fR\fR
348 348 .ad
349 349 .RS 23n
350 350 Rolls the \fBLWP\fR out of a critical section when the process is stopped.
351 351 .RE
352 352
353 353 .sp
354 354 .ne 2
355 355 .na
356 356 \fB\fBps_plog()\fR\fR
357 357 .ad
358 358 .RS 23n
359 359 Logs a message.
360 360 .RE
361 361
362 362 .ne 2
363 363 .na
364 364 \fB\fBps_lgetxregsize()\fR\fR
365 365 .ad
366 366 .RS 21n
367 367 Returns the size of the architecture-dependent extra state registers.
368 368 .RE
369 369
370 370 .sp
371 371 .ne 2
372 372 .na
373 373 \fB\fBps_lgetxregs()\fR\fR
374 374 .ad
375 375 .RS 21n
376 376 Gets the extra state registers of the \fBLWP\fR.
377 377 .RE
378 378
379 379 .sp
380 380 .ne 2
381 381 .na
382 382 \fB\fBps_lsetxregs()\fR\fR
383 383 .ad
384 384 .RS 21n
385 385 Sets the extra state registers of the \fBLWP\fR.
386 386 .RE
387 387
388 388 .SS "x86"
389 389 .ne 2
390 390 .na
391 391 \fB\fBps_lgetLDT()\fR\fR
392 392 .ad
393 393 .RS 16n
394 394 Reads the local descriptor table of the \fBLWP\fR.
395 395 .RE
396 396
397 397 .SH ATTRIBUTES
398 398 See \fBattributes\fR(7) for description of the following attributes:
399 399 .sp
400 400
401 401 .sp
402 402 .TS
403 403 box;
404 404 c | c
405 405 l | l .
406 406 ATTRIBUTE TYPE ATTRIBUTE VALUE
407 407 _
408 408 MT Level Safe
409 409 .TE
410 410
411 411 .SH SEE ALSO
412 412 .BR rtld_db (3EXT),
413 413 .BR libc_db (3LIB),
414 414 .BR librtld_db (3LIB),
415 415 .BR ps_pread (3PROC),
416 416 .BR attributes (7)
417 417 .sp
418 418 .LP
419 419 \fILinker and Libraries Guide\fR
|
↓ open down ↓ |
419 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX