Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
usr/src/uts/common/fs/proc/prcontrol.c
usr/src/uts/intel/os/archdep.c
usr/src/uts/intel/sys/ucontext.h
usr/src/uts/intel/syscall/getcontext.c
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man3lib/libproc.3lib
+++ new/usr/src/man/man3lib/libproc.3lib
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
|
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2018 Joyent, Inc.
13 13 .\" Copyright (c) 2019 Carlos Neira <cneirabustos@gmail.com>
14 14 .\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
15 +.\" Copyright 2023 Oxide Computer Company
15 16 .\"
16 -.Dd March 10, 2023
17 +.Dd March 20, 2023
17 18 .Dt LIBPROC 3LIB
18 19 .Os
19 20 .Sh NAME
20 21 .Nm libproc
21 22 .Nd process control library
22 23 .Sh SYNOPSIS
23 24 .Lb libproc
24 25 .In libproc.h
25 26 .Sh DESCRIPTION
26 27 The
27 28 .Nm
28 29 library provides consumers a general series of interfaces to inspect
29 30 and control both live processes and core files.
30 31 It is intended for introspection tools such as debuggers by providing a
31 32 high-level interface to the /proc file system
32 33 .Pf ( Xr proc 5 ) .
33 34 .Pp
34 35 The
35 36 .Nm
36 37 library provides interfaces that focus on:
37 38 .Bl -bullet -offset indent
38 39 .It
39 40 Creating and attaching to live process, core files, and arbitrary ELF
40 41 objects.
41 42 .It
42 43 Interrogating the state of a process or core file.
43 44 .It
44 45 Manipulating the current state of a process or thread.
45 46 .It
46 47 Interrogating the state of threads of a process or core file.
47 48 .It
48 49 Running system calls in the context of another process.
49 50 .It
50 51 Various utilities for iterating process and core file file descriptors,
51 52 mappings, symbols, and more.
52 53 .It
53 54 Various utilities to support debugging tools.
54 55 .El
55 56 .Ss Live Processes
56 57 The
57 58 .Nm
58 59 library can be used to manipulate running processes and to create new
59 60 ones.
60 61 To manipulate an existing process first
61 62 .Em grab
62 63 it with the
63 64 .Fn Pgrab
64 65 function.
65 66 A process is generally stopped as a side effect of grabbing it.
66 67 Callers must exercise caution, as if they do not use the library correctly, or
67 68 they terminate unexpectedly, a process may remain stopped.
68 69 .Pp
69 70 Unprivileged users may only grab their own processes.
70 71 Users with the privilege
71 72 .Brq Sy PRIV_PROC_OWNER
72 73 may manipulate processes that they do not own; however, additional
73 74 restrictions as described in
74 75 .Xr privileges 7
75 76 apply.
76 77 .Pp
77 78 In addition, the
78 79 .Fn Pcreate
79 80 and
80 81 .Fn Pxcreate
81 82 functions may be used to create processes which are always controlled by
82 83 the library.
83 84 .Ss Core Files
84 85 The
85 86 .Nm
86 87 library has the ability to open and interpret core files produced by
87 88 processes on the system.
88 89 Process core dump generation is controlled by the
89 90 .Xr coreadm 8
90 91 command.
91 92 In addition, the library has the ability to understand and interpret core dumps
92 93 generated by Linux kernel and can provide a subset of its functionality on such
93 94 core files, provided the original binary is also present.
94 95 .Pp
95 96 Not all functions in the
96 97 .Nm
97 98 library are valid for core files.
98 99 In general, none of the commands which manipulate the current state of a process
99 100 or thread or that try to force system calls on a victim process will work.
100 101 Furthermore several of the information and iteration interfaces are limited
101 102 based on the data that is available in the core file.
102 103 For example, if the core file is of a process that omits the frame pointer, the
103 104 ability to iterate the stack will be limited.
104 105 .Pp
105 106 Use the
106 107 .Fn Pgrab_core
107 108 or
108 109 .Fn Pfgrab_core
109 110 function to open a core file.
110 111 Use the
111 112 .Fn Pgrab_file
112 113 function to open an ELF object file.
113 114 This is useful for obtaining information stored in ELF headers and
114 115 sections.
115 116 .Ss Debug Information
116 117 Many of the operations in the library rely on debug information being
117 118 present in a process and its associated libraries.
118 119 The library leverages symbol table information, CTF data
119 120 .Pq Xr ctf 5
120 121 sections, and frame unwinding information based on the use of an ABI
121 122 defined frame pointer, e\&.g\&.
122 123 .Sy %ebp
123 124 and
124 125 .Sy %rbp
125 126 on x86 systems.
126 127 .Pp
127 128 Some software providers strip programs of this information or build
128 129 their executables such that the information will not be present in a
129 130 core dump.
130 131 To deal with this fact, the library is able to consume information that is not
131 132 present in the core file or the running process.
132 133 It can both consume it from the underlying executable and it also supports
133 134 finding it from related ELF objects that are linked to it via the
134 135 .Sy .gnu_debuglink
135 136 and the
136 137 .Sy .note.gnu.build-id
137 138 ELF sections.
138 139 .Ss Iteration Interfaces
139 140 The
140 141 .Nm
141 142 library provides the ability to iterate over the following aspects of a
142 143 process or core file:
143 144 .Bl -bullet -offset indent
144 145 .It
145 146 Active threads
146 147 .It
147 148 Active and zombie threads
148 149 .It
149 150 All non-system processes
150 151 .It
151 152 All process mappings
152 153 .It
153 154 All objects in a process
154 155 .It
155 156 The environment
156 157 .It
157 158 The symbol table
158 159 .It
159 160 Stack frames
160 161 .It
161 162 File Descriptors
162 163 .El
163 164 .Ss System Call Injection
164 165 The
165 166 .Nm
166 167 library allows the caller to force system calls to be executed in the
167 168 context of the running process.
168 169 This can be used both as a tool for introspection, allowing one to get
169 170 information outside its current context as well as performing modifications to a
170 171 process.
171 172 .Pp
172 173 These functions run in the context of the calling process.
173 174 This is often an easier way of getting non-exported information about a
174 175 process from the system.
175 176 For example, the
176 177 .Xr pfiles 1
177 178 command uses this interface to get more detailed information about a
178 179 process's open file descriptors, which it would not have access to
179 180 otherwise.
180 181 .Sh INTERFACES
181 182 The shared object
182 183 .Sy libproc.so.1
183 184 provides the public interfaces defined below.
184 185 See
185 186 .Xr Intro 3
186 187 for additional information on shared object interfaces.
187 188 Functions are organized into categories that describe their purpose.
188 189 Individual functions are documented in their own manual pages.
189 190 .Ss Creation, Grabbing, and Releasing
190 191 The following routines are related to creating library handles,
191 192 grabbing cores, processes, and threads, and releasing those resources.
192 193 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
193 194 .It Sy Lfree Ta Sy Lgrab
194 195 .It Sy Lgrab_error Ta Sy Pcreate
195 196 .It Sy Pcreate_agent Ta Sy Pcreate_callback
196 197 .It Sy Pcreate_error Ta Sy Pdestroy_agent
197 198 .It Sy Pfgrab_core Ta Sy Pfree
198 199 .It Sy Pgrab Ta Sy Pgrab_core
199 200 .It Sy Pgrab_error Ta Sy Pgrab_file
200 201 .It Sy Pgrab_ops Ta Sy Prelease
201 202 .It Sy Preopen Ta Sy Pxcreate
202 203 .El
203 204 .Ss Process interrogation and manipulation
204 205 The following routines obtain information about a process and allow
205 206 manipulation of the process itself.
206 207 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
207 208 .It Sy Paddr_to_ctf Ta Sy Paddr_to_loadobj
208 209 .It Sy Paddr_to_map Ta Sy Paddr_to_text_map
209 210 .It Sy Pasfd Ta Sy Pclearfault
210 211 .It Sy Pclearsig Ta Sy Pcontent
|
↓ open down ↓ |
184 lines elided |
↑ open up ↑ |
211 212 .It Sy Pcred Ta Sy Pctlfd
212 213 .It Sy Pdelbkpt Ta Sy Pdelwapt
213 214 .It Sy Pdstop Ta Sy Pexecname
214 215 .It Sy Pfault Ta Sy Pfgcore
215 216 .It Sy Pgcore Ta Sy Pgetareg
216 217 .It Sy Pgetauxval Ta Sy Pgetauxvec
217 218 .It Sy Pgetenv Ta Sy Pisprocdir
218 219 .It Sy Pissyscall_prev Ta Sy Plmid
219 220 .It Sy Plmid_to_loadobj Ta Sy Plmid_to_map
220 221 .It Sy Plookup_by_addr Ta Sy Plookup_by_name
221 -.It Sy Plwp_alt_stack Ta Sy Plwp_getfpregs
222 -.It Sy Plwp_getname Ta Sy Plwp_getpsinfo
223 -.It Sy Plwp_getregs Ta Sy Plwp_getspymaster
224 -.It Sy Plwp_main_stack Ta Sy Plwp_setfpregs
225 -.It Sy Plwp_setregs Ta Sy Plwp_stack
226 222 .It Sy Pname_to_ctf Ta Sy Pname_to_loadobj
227 223 .It Sy Pname_to_map Ta Sy Pobjname
228 224 .It Sy Pobjname_resolved Ta Sy Pplatform
229 225 .It Sy Ppltdest Ta Sy Ppriv
230 226 .It Sy Ppsinfo Ta Sy Pputareg
231 227 .It Sy Prd_agent Ta Sy Pread
232 228 .It Sy Pread_string Ta Sy Preset_maps
233 229 .It Sy Psetbkpt Ta Sy Psecflags
234 230 .It Sy Psetcred Ta Sy Psetfault
235 231 .It Sy Psetflags Ta Sy Psetpriv
236 232 .It Sy Psetrun Ta Sy Psetsignal
237 233 .It Sy Psetsysentry Ta Sy Psetsysexit
238 234 .It Sy Psetwapt Ta Sy Psetzoneid
239 235 .It Sy Psignal Ta Sy Pstate
240 236 .It Sy Pstatus Ta Sy Pstop
241 237 .It Sy Pstopstatus Ta Sy Psync
242 238 .It Sy Psysentry Ta Sy Psysexit
243 239 .It Sy Puname Ta Sy Pupanic
244 240 .It Sy Pupanic_free Ta Sy Punsetflags
245 241 .It Sy Pupdate_maps Ta Sy Pupdate_syms
246 242 .It Sy Pwait Ta Sy Pwrite
247 243 .It Sy Pxecbkpt Ta Sy Pxecwapt
248 244 .It Sy Pxlookup_by_addr Ta Sy Pxlookup_by_addr_resolved
|
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
249 245 .It Sy Pxlookup_by_name Ta Sy Pzonename
250 246 .It Sy Pzonepath Ta Sy Pzoneroot Ta
251 247 .El
252 248 .Ss Thread interrogation and manipulation
253 249 The following routines obtain information about a thread and allow
254 250 manipulation of the thread itself.
255 251 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
256 252 .It Sy Lalt_stack Ta Sy Lclearfault
257 253 .It Sy Lclearsig Ta Sy Lctlfd
258 254 .It Sy Ldstop Ta Sy Lgetareg
259 -.It Sy Lmain_stack Ta Sy Lprochandle
260 -.It Sy Lpsinfo Ta Sy Lputareg
261 -.It Sy Lsetrun Ta Sy Lstack
255 +.It Sy Lgetfpregs Ta Sy Lgetregs
256 +.It Sy Lgetxregs Ta Sy Lmain_stack
257 +.It Sy Lprochandle Ta Sy Lpsinfo
258 +.It Sy Lputareg Ta Sy Lsetrun
259 +.It Sy Lsetfpregs Ta Sy Lsetregs
260 +.It Sy Lsetxregs Ta Sy Lstack
262 261 .It Sy Lstate Ta Sy Lstatus
263 262 .It Sy Lstop Ta Sy Lsync
264 263 .It Sy Lwait Ta Sy Lxecbkpt
265 -.It Sy Lxecwapt Ta ""
264 +.It Sy Lxecwapt Ta Sy ""
266 265 .El
266 +.Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
267 +.It Sy Plwp_alt_stack Ta Sy Plwp_freexregs
268 +.It Sy Plwp_getfpregs Ta Sy Plwp_getname
269 +.It Sy Plwp_getpsinfo Ta Sy Plwp_getregs
270 +.It Sy Plwp_getspymaster Ta Sy Plwp_main_stack
271 +.It Sy Plwp_getxregs Ta Sy Plwp_setfpregs
272 +.It Sy Plwp_setregs Ta Sy Plwp_setxregs
273 +.It Sy Plwp_stack Ta Sy ""
274 +.El
267 275 .Ss System Call Injection
268 276 The following routines are used to inject specific system calls and have
269 277 them run in the context of a process.
270 278 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
271 279 .It Sy pr_access Ta Sy pr_close
272 280 .It Sy pr_creat Ta Sy pr_door_info
273 281 .It Sy pr_exit Ta Sy pr_fcntl
274 282 .It Sy pr_fstat Ta Sy pr_fstat64
275 283 .It Sy pr_fstatvfs Ta Sy pr_getitimer
276 284 .It Sy pr_getpeername Ta Sy pr_getpeerucred
277 285 .It Sy pr_getprojid Ta Sy pr_getrctl
278 286 .It Sy pr_getrlimit Ta Sy pr_getrlimit64
279 287 .It Sy pr_getsockname Ta Sy pr_getsockopt
280 288 .It Sy pr_gettaskid Ta Sy pr_getzoneid
281 289 .It Sy pr_ioctl Ta Sy pr_link
282 290 .It Sy pr_llseek Ta Sy pr_lseek
283 291 .It Sy pr_lstat Ta Sy pr_lstat64
284 292 .It Sy pr_memcntl Ta Sy pr_meminfo
285 293 .It Sy pr_mmap Ta Sy pr_munmap
286 294 .It Sy pr_open Ta Sy pr_processor_bind
287 295 .It Sy pr_rename Ta Sy pr_setitimer
288 296 .It Sy pr_setrctl Ta Sy pr_setrlimit
289 297 .It Sy pr_setrlimit64 Ta Sy pr_settaskid
290 298 .It Sy pr_sigaction Ta Sy pr_stat
291 299 .It Sy pr_stat64 Ta Sy pr_statvfs
292 300 .It Sy pr_unlink Ta Sy pr_waitid
293 301 .El
294 302 .Ss Iteration routines
295 303 These routines are used to iterate over the contents of a process.
296 304 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
297 305 .It Sy Penv_iter Ta Sy Plwp_iter
298 306 .It Sy Plwp_iter_all Ta Sy Pmapping_iter
299 307 .It Sy Pmapping_iter_resolved Ta Sy Pobject_iter
300 308 .It Sy Pobject_iter_resolved Ta Sy Pstack_iter
301 309 .It Sy Psymbol_iter Ta Sy Psymbol_iter_by_addr
302 310 .It Sy Psymbol_iter_by_lmid Ta Sy Psymbol_iter_by_name
303 311 .It Sy Pxsymbol_iter Ta Sy Pfdinfo_iter
304 312 .El
305 313 .Ss Utility routines
306 314 The following routines are utilities that are useful to consumers of the
307 315 library.
308 316 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
309 317 .It Sy Perror_printf Ta Sy proc_arg_grab
310 318 .It Sy proc_arg_psinfo Ta Sy proc_arg_xgrab
311 319 .It Sy proc_arg_xpsinfo Ta Sy proc_content2str
312 320 .It Sy proc_dmodelname Ta Sy proc_finistdio
313 321 .It Sy proc_fltname Ta Sy proc_fltset2str
314 322 .It Sy proc_flushstdio Ta Sy proc_get_auxv
315 323 .It Sy proc_fdinfo_misc Ta Sy proc_get_cred
316 324 .It Sy proc_get_fdinfo Ta Sy proc_get_lwpsinfo
317 325 .It Sy proc_get_priv Ta Sy proc_get_psinfo
318 326 .It Sy proc_get_status Ta Sy proc_get_initstdio
319 327 .It Sy proc_lwp_in_set Ta Sy proc_lwp_range_valid
320 328 .It Sy proc_signame Ta Sy proc_sigset2str
321 329 .It Sy proc_str2content Ta Sy proc_str2flt
322 330 .It Sy proc_str2fltset Ta Sy proc_str2sig
323 331 .It Sy proc_str2sigset Ta Sy proc_str2sys
324 332 .It Sy proc_str2sysset Ta Sy proc_sysname
325 333 .It Sy proc_sysset2str Ta Sy proc_unctrl_psinfo
326 334 .El
327 335 .Ss x86 Specific Routines
328 336 The following routines are specific to the x86, 32-bit and 64-bit,
329 337 versions of the
330 338 .Nm
|
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
331 339 library.
332 340 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
333 341 .It Sy Pldt Ta Sy proc_get_ldt
334 342 .El
335 343 .Ss SPARC specific Routines
336 344 The following functions are specific to the SPARC, 32-bit and 64-bit,
337 345 versions of the
338 346 .Nm
339 347 library.
340 348 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
341 -.It Sy Plwp_getgwindows Ta Sy Plwp_getxregs
342 -.It Sy Plwp_setxregs Ta Sy ""
349 +.It Sy Plwp_getgwindows Ta Sy ""
343 350 .El
344 351 .Pp
345 352 The following functions are specific to the 64-bit SPARC version of the
346 353 .Nm
347 354 library.
348 355 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
349 356 .It Sy Plwp_getasrs Ta Sy Plwp_setasrs
350 357 .El
351 358 .Sh PROCESS STATES
352 359 Every process handle that exists in
353 360 .Nm
354 361 has a state.
355 362 In some cases, such as for core files, these states are static.
356 363 In other cases, such as handles that correspond to a running process or a
357 364 created process, these states are dynamic and change based on actions taken in
358 365 the library.
359 366 The state can be obtained with the
360 367 .Xr Pstate 3PROC
361 368 function.
362 369 .Pp
363 370 The various states are:
364 371 .Bl -tag -width Dv -offset indent
365 372 .It Dv PS_RUN
366 373 An actively running process.
367 374 This may be a process that was obtained by creating it with functions such as
368 375 .Xr Pcreate 3PROC
369 376 or by grabbing an existing process such as
370 377 .Xr Pgrab 3PROC .
371 378 .It Dv PS_STOP
372 379 An active process that is no longer executing.
373 380 A process may stop for many reasons such as an explicit stop request (through
374 381 .Xr pstop 1
375 382 for example) or if a tracing event is hit.
376 383 .Pp
377 384 The reason a process is stopped may be obtained through the thread's
378 385 .Vt lwpstatus_t
379 386 structure read directly from /proc or obtained through the
380 387 .Xr Lstatus 3PROC
381 388 function.
382 389 .It Dv PS_LOST
383 390 Control over the process has been lost.
384 391 This may happen when the process executes a new image requiring a different set
385 392 of privileges.
386 393 To resume control call
387 394 .Xr Preopen 3PROC .
388 395 For more information on losing control of a process, see
389 396 .Xr proc 5 .
390 397 .It Dv PS_UNDEAD
391 398 A zombie process.
392 399 It has terminated, but it has not been cleaned up yet by its parent.
393 400 For more on the conditions of becoming a zombie, see
394 401 .Xr exec 2 .
395 402 .It Dv PS_DEAD
396 403 Processes in this state are always core files.
397 404 See the earlier section
398 405 .Sx Core Files
399 406 for more information on working with core files.
400 407 .It Dv PS_IDLE
401 408 A process that has never been run.
402 409 This is always the case for handles that refer to files as the files cannot be
403 410 executed.
404 411 Those process handles are obtained through calling
405 412 .Xr Pgrab_file 3PROC .
406 413 .El
407 414 .Pp
408 415 Many functions relating to tracing processes, for example
409 416 .Xr Psignal 3PROC ,
410 417 .Xr Psetsignal 3PROC ,
411 418 .Xr Psetfault 3PROC ,
412 419 .Xr Psysentry 3PROC ,
413 420 and others, mention that they only act upon
414 421 .Em Active Processes .
415 422 This specifically refers to processes whose state are in
416 423 .Dv PS_RUN
417 424 and
418 425 .Dv PS_STOP .
419 426 Process handles in the other states have no notion of settable tracing
420 427 flags, though core files
421 428 .Pq type Dv PS_DEAD
422 429 may have a read-only snapshot of their tracing settings available.
423 430 .Sh TYPES
424 431 The
425 432 .Nm
426 433 library uses many types that come from the /proc file system
427 434 .Pq Xr proc 5
428 435 and the ELF format
429 436 .Pq Xr elf 3ELF .
430 437 However, it also defines the following types:
431 438 .Pp
432 439 .Vt struct ps_prochandle
433 440 .Pp
434 441 The
435 442 .Vt struct ps_prochandle
436 443 is an opaque handle to the library and the core element of control for a
437 444 process.
438 445 Consumers obtain pointers to a handle through the use of the
439 446 .Fn Pcreate ,
440 447 .Fn Pgrab ,
441 448 and related functions.
442 449 When a caller is done with a handle, then it should call one of the
443 450 .Fn Pfree
444 451 and
445 452 .Fn Prelease
446 453 functions to relinquish the handle, release associated resources, and
447 454 potentially set the process to run again.
448 455 .Pp
449 456 .Vt struct ps_lwphandle
450 457 .Pp
451 458 The
452 459 .Vt struct ps_lwphandle
453 460 is analogous to the
454 461 .Vt struct ps_prochandle ,
455 462 but it represents the control of an individual thread, rather than a
456 463 process.
457 464 Consumers obtain pointers to a handle through the
458 465 .Fn Lgrab
459 466 function and relinquish it with the
460 467 .Fn Lfree
461 468 function.
462 469 .Pp
463 470 .Vt core_content_t
464 471 .Pp
465 472 The
466 473 .Vt core_content_t
467 474 is a value which describes the various content types of core files.
468 475 These are used in functions such as
469 476 .Xr Pcontent 3PROC
470 477 and
471 478 .Xr Pgcore 3PROC
472 479 to describe and control the types of content that get included.
473 480 Various content types may be included together through a bitwise-inclusive-OR.
474 481 The default system core contents are controlled with the
475 482 .Xr coreadm 8
476 483 tool.
477 484 The following table lists the current set of core contents in the system, though
478 485 the set may increase over time.
479 486 The string after the macro is the human readable string that corresponds with
480 487 the constant and is used by
481 488 .Xr coreadm 8 ,
482 489 .Xr proc_content2str 3PROC ,
483 490 and
484 491 .Xr proc_str2content 3PROC .
485 492 .Bl -tag -offset indent -width indent
486 493 .It Dv CC_CONTENT_STACK ("stack")
487 494 The contents include the process stack.
488 495 Note, this only covers the main thread's stack.
489 496 The stack of other threads is covered by
490 497 .Dv CC_CONTENT_ANON .
491 498 .It Dv CC_CONTENT_HEAP ("heap")
492 499 The contents include the process heap.
493 500 .It Dv CC_CONTENT_SHFILE ("shfile")
494 501 The contents include shared mappings that are backed by files (e.g.
495 502 mapped through
496 503 .Xr mmap 2
497 504 with the
498 505 .Dv MAP_SHARED
499 506 flag).
500 507 .It Dv CC_CONTENT_SHANNON ("shannon")
501 508 The contents include shared mappings that are backed by anonymous memory
502 509 (e.g. mapped through
503 510 .Xr mmap 2
504 511 with the
505 512 .Dv MAP_SHARED
506 513 and
507 514 .Dv MAP_ANON
508 515 flags).
509 516 .It Dv CC_CONTENT_RODATA ("rodata")
510 517 The contents include private read-only file mappings, such as shared
511 518 library text.
512 519 .It Dv CC_CONTENT_ANON ("anon")
513 520 The contents include private anonymous mappings.
514 521 This includes the stacks of threads which are not the main thread.
515 522 .It Dv CC_CONTENT_SHM ("shm")
516 523 The contents include system V shared memory.
517 524 .It Dv CC_CONTENT_ISM ("ism")
518 525 The contents include ISM (intimate shared memory) mappings.
519 526 .It Dv CC_CONTENT_DISM ("dism")
520 527 The contents include DISM (dynamic shared memory) mappings.
521 528 .It Dv CC_CONTENT_CTF ("ctf")
522 529 The contents include
523 530 .Xr ctf 5
524 531 (Compact C Type Format) information.
525 532 Note, not all objects in the process may have CTF information available.
526 533 .It Dv CC_CONTENT_SYMTAB ("symtab")
527 534 The contents include the symbol table.
528 535 Note, not all objects in the process may have a symbol table available.
529 536 .It Dv CC_CONTENT_ALL ("all")
530 537 This value indicates that all of the above content values are present.
531 538 Note that additional values may be added in the future, in which case
532 539 the value of the symbol will be updated to include them.
533 540 Comparisons with
534 541 .Dv CC_CONTENT_ALL
535 542 should validate all the expected bits are set by an expression such as
536 543 .Li (c & CC_CONTENT_ALL) == CC_CONTENT_ALL .
537 544 .It Dv CC_CONTENT_NONE ("none")
538 545 This value indicates that there is no content present.
539 546 .It Dv CC_CONTENT_DEFAULT ("default")
540 547 The content includes the following set of default values:
541 548 .Dv CC_CONTENT_STACK ,
542 549 .Dv CC_CONTENT_HEAP ,
543 550 .Dv CC_CONTENT_ISM ,
544 551 .Dv CC_CONTENT_DISM ,
545 552 .Dv CC_CONTENT_SHM ,
546 553 .Dv CC_CONTENT_SHANON ,
547 554 .Dv CC_CONTENT_TEXT ,
548 555 .Dv CC_CONTENT_DATA ,
549 556 .Dv CC_CONTENT_RODATA ,
550 557 .Dv CC_CONTENT_ANON ,
551 558 .Dv CC_CONTENT_CTF ,
552 559 and
553 560 .Dv CC_CONTENT_SYMTAB .
554 561 Note that the default may change.
555 562 Comparisons with CC_CONTENT_DEFAULT should validate that all of the expected
556 563 bits are set with an expression such as
557 564 .Li (c\ &\ CC_CONTENT_DEFAULT)\ ==\ CC_CONTENT_DEFAULT .
558 565 .It Dv CC_CONTENT_INVALID
559 566 This indicates that the contents are invalid.
560 567 .El
561 568 .Pp
562 569 .Vt prfdinfo_t
563 570 .Pp
564 571 The
565 572 .Vt prfdinfo_t
566 573 structure is used with the
567 574 .Fn Pfdinfo_iter ,
568 575 .Fn proc_fdwalk ,
569 576 .Fn proc_fdinfowalk
570 577 and
571 578 .Fn proc_get_fdinfo
572 579 functions and describes information about a file descriptor.
573 580 The structure is defined as follows:
574 581 .Bd -literal
575 582 typedef struct prfdinfo {
576 583 int pr_fd; /* file descriptor number */
577 584 mode_t pr_mode; /* (see st_mode in stat(2)) */
578 585 ino64_t pr_ino; /* inode number */
579 586 off64_t pr_size; /* file size */
580 587 off64_t pr_offset; /* current offset */
581 588 uid_t pr_uid; /* owner's user id */
582 589 gid_t pr_gid; /* owner's group id */
583 590 major_t pr_major; /* major number of device */
584 591 minor_t pr_minor; /* minor number of device */
585 592 major_t pr_rmajor; /* major number (if special file) */
586 593 minor_t pr_rminor; /* minor number (if special file) */
587 594 int pr_fileflags; /* (see F_GETXFL in fcntl(2)) */
588 595 int pr_fdflags; /* (see F_GETFD in fcntl(2)) */
589 596 short pr_locktype; /* (see F_GETLK in fcntl(2)) */
590 597 pid_t pr_lockpid; /* process holding file lock */
591 598 int pr_locksysid; /* sysid of locking process */
592 599 pid_t pr_peerpid; /* peer process (socket, door) */
593 600 int pr_filler[25]; /* reserved for future use */
594 601 char pr_peername[PRFNSZ]; /* peer process name */
595 602 #if __STDC_VERSION__ >= 199901L
596 603 uint8_t pr_misc[]; /* self describing structures */
597 604 else
598 605 uint8_t pr_misc[1]; /* self describing structures */
599 606 #endif
600 607 } prfdinfo_t;
601 608 .Ed
602 609 .Pp
603 610 The structure has similar information to that found in the
604 611 .Sy stat
605 612 structure that's used as part of the stat family of system calls,
606 613 defined in
607 614 .Xr stat 2 .
608 615 The member
609 616 .Sy pr_fd
610 617 contains the number of the file descriptor of the file.
611 618 The members
612 619 .Fa pr_mode ,
613 620 .Fa pr_uid ,
614 621 .Fa pr_gid ,
615 622 .Fa pr_ino ,
616 623 and
617 624 .Fa pr_size
618 625 are the same as the members
619 626 .Fa st_mode ,
620 627 .Fa st_uid ,
621 628 .Fa st_gid ,
622 629 .Fa st_ino ,
623 630 and
624 631 .Fa st_size
625 632 in the
626 633 .Fa stat
627 634 structure.
628 635 .Pp
629 636 The
630 637 .Fa pr_major
631 638 and
632 639 .Fa pr_minor
633 640 members contain the major and minor numbers of the device containing the
634 641 directory for this file.
635 642 This is similar to the
636 643 .Fa st_dev
637 644 member of the
638 645 .Vt stat
639 646 structure, except that it is broken out into its major and minor components.
640 647 The
641 648 .Fa pr_rmajor
642 649 and
643 650 .Fa pr_rminor
644 651 members are similar in spirit to
645 652 .Fa pr_major
646 653 and
647 654 .Fa pr_minor ;
648 655 however, they are equivalent to the
649 656 .Fa st_rdev
650 657 member of the
651 658 .Vt stat
652 659 structure and thus have meaning for special character and block files.
653 660 .Pp
654 661 The
655 662 .Fa pr_offset
656 663 member contains the current seek offset of the file descriptor.
657 664 The
658 665 .Fa pr_fileflags
659 666 and
660 667 .Fa pr_fdflags
661 668 members contain the flags that would have been returned by a call to
662 669 .Xr fcntl 2
663 670 with the arguments
664 671 .Dv F_GETXFL
665 672 and
666 673 .Dv F_GETFD
667 674 respectively.
668 675 .Pp
669 676 The
670 677 .Fa pr_locktype ,
671 678 .Fa pr_lockpid ,
672 679 and
673 680 .Fa pr_locksysid
674 681 contain the information that would have been returned by a call to
675 682 .Xr fcntl 2
676 683 with an argument of
677 684 .Dv F_GETLK .
678 685 .Pp
679 686 The
680 687 .Fa pr_peerpid
681 688 and
682 689 .Fa pr_peername
683 690 members contain the process ID and name of any peer endpoint of a
684 691 connection-oriented socket or stream fd.
685 692 This information is the same as that which would be returned by a call to
686 693 .Xr getpeerucred 3C
687 694 .Pp
688 695 The
689 696 .Fa pr_misc
690 697 member contains miscellaneous additional data relating to the file descriptor.
691 698 The format of these data is described in
692 699 .Xr proc 5 .
693 700 .Pp
694 701 .Vt prsyminfo_t
695 702 .Pp
696 703 The
697 704 .Vt prsyminfo_t
698 705 structure is used with the various symbol look up functions
699 706 .Fn Pxlookup_by_name ,
700 707 .Fn Pxlookup_by_addr ,
701 708 and
702 709 .Fn Pxlookup_by_addr_resolved
703 710 which describes additional information about a symbol.
704 711 The structure is defined as follows:
705 712 .Bd -literal
706 713 typedef struct prsyminfo {
707 714 const char *prs_object; /* object name */
708 715 const char *prs_name; /* symbol name */
709 716 Lmid_t prs_lmid; /* link map id */
710 717 uint_t prs_id; /* symbol id */
711 718 uint_t prs_table; /* symbol table id */
712 719 } prsyminfo_t;
713 720 .Ed
714 721 .Pp
715 722 The member
716 723 .Fa prs_object
717 724 points to a string that contains the name of the object file, if known,
718 725 that the symbol comes from.
719 726 The member
720 727 .Fa prs_name
721 728 points to the name of the symbol, if known.
722 729 This may be unknown due to a stripped binary that contains no symbol table.
723 730 The member
724 731 .Fa prs_lmid
725 732 indicates the link map identifier that the symbol was found on.
726 733 For more information on link map identifiers refer to the
727 734 .%B Linker and Libraries Guide
728 735 and
729 736 .Xr dlopen 3C .
730 737 .Pp
731 738 The members
732 739 .Fa prs_id
733 740 and
734 741 .Fa prs_table
735 742 can be used to determine both the symbol table that the entry came from
736 743 and which entry in the table it corresponds to.
737 744 If the value of
738 745 .Fa prs_table
739 746 is
740 747 .Dv PR_SYMTAB
741 748 then it came from the ELF standard symbol table.
742 749 However, if it is instead
743 750 .Dv PR_DYNSYM ,
744 751 then that indicates that it comes from the process's dynamic section.
745 752 .Pp
746 753 .Vt proc_lwp_f
747 754 .Pp
748 755 The
749 756 .Vt proc_lwp_f
750 757 is a function pointer type that is used with the
751 758 .Fn Plwp_iter
752 759 function.
753 760 It is defined as
754 761 .Sy typedef
755 762 .Ft int
756 763 .Fo proc_lwp_f
757 764 .Fa "void *"
758 765 .Fa "const lwpstatus_t *"
759 766 .Fc .
760 767 The first argument is a pointer to an argument that the user specifies,
761 768 while the second has the thread's status information and is defined in
762 769 .Xr proc 5 .
763 770 For additional information on using this type, see
764 771 .Xr Plwp_iter 3PROC .
765 772 .Pp
766 773 .Vt proc_lwp_all_f
767 774 .Pp
768 775 The
769 776 .Vt proc_lwp_all_f
770 777 is a function pointer type that is used with the
771 778 .Fn Plwp_iter_all
772 779 function.
773 780 It is defined as
774 781 .Sy typedef
775 782 .Ft int
776 783 .Fo proc_lwp_all_f
777 784 .Fa "void *"
778 785 .Fa "const lwpstatus_t *"
779 786 .Fa "const lwpsinfo_t *"
780 787 .Fc .
781 788 The first argument is a pointer to an argument that the user specifies.
782 789 The second and third arguments contain the thread's status and
783 790 thread-specific
784 791 .Xr ps 1
785 792 information respectively.
786 793 Both structures are defined in
787 794 .Xr proc 5 .
788 795 For additional information on using this type, see
789 796 .Xr Plwp_iter_all 3PROC .
790 797 .Pp
791 798 .Vt proc_fdinfowalk_f
792 799 .Pp
793 800 The
794 801 .Vt proc_fdinfowalk_f
795 802 is a function pointer type that is used with the
796 803 .Fn proc_fdinfowalk
797 804 function to walk the miscellaneous data items contained within a
798 805 .Vt prfdinfo_t
799 806 structure.
800 807 It is defined as
801 808 .Sy typedef
802 809 .Ft int
803 810 .Fo proc_fdinfowalk_f
804 811 .Fa "uint_t"
805 812 .Fa "const void *"
806 813 .Fa "size_t"
807 814 .Fa "void *"
808 815 .Fc .
809 816 The first argument contains the type of the miscellaneous information being
810 817 presented, the second and third provide a pointer to the associated data and
811 818 the length of that data.
812 819 The final argument is a pointer to an argument that the user specifies.
813 820 For more information on using this, see
814 821 .Xr proc_fdinfowalk 3PROC .
815 822 .Pp
816 823 .Vt proc_fdwalk_f
817 824 .Pp
818 825 The
819 826 .Vt proc_fdwalk_f
820 827 is a function pointer type that is used with the
821 828 .Fn proc_fdwalk
822 829 function.
823 830 It is defined as
824 831 .Sy typedef
825 832 .Ft int
826 833 .Fo proc_fdwalk_f
827 834 .Fa "const prfdinfo_t *"
828 835 .Fa "void *"
829 836 .Fc .
830 837 The first argument contains the file descriptor information.
831 838 The
832 839 .Sy prfdinfo_t
833 840 structure is defined in
834 841 .Xr proc 5 .
835 842 The final argument is a pointer to an argument that the user specifies.
836 843 For more information on using this, see
837 844 .Xr proc_fdwalk 3PROC .
838 845 .Pp
839 846 .Vt proc_walk_f
840 847 .Pp
841 848 The
842 849 .Vt proc_walk_f
843 850 is a function pointer type that is used with the
844 851 .Fn proc_walk
845 852 function.
846 853 It is defined as
847 854 .Sy typedef
848 855 .Ft int
849 856 .Fo proc_walk_f
850 857 .Fa "psinfo_t *"
851 858 .Fa "lwpsinfo_t *"
852 859 .Fa "void *"
853 860 .Fc .
854 861 The first argument contains the process
855 862 .Xr ps 1
856 863 information and the second argument contains the representative thread's
857 864 .Xr ps 1
858 865 information.
859 866 Both structures are defined in
860 867 .Xr proc 5 .
861 868 The final argument is a pointer to an argument that the user specifies.
862 869 For more information on using this, see
863 870 .Xr proc_walk 3PROC .
864 871 .Pp
865 872 .Vt proc_map_f
866 873 .Pp
867 874 The
868 875 .Vt proc_map_f
869 876 is a function pointer type that is used with the
870 877 .Fn Pmapping_iter ,
871 878 .Fn Pmapping_iter_resolved ,
872 879 .Fn Pobject_iter ,
873 880 and
874 881 .Fn Pobject_iter_resolved
875 882 functions.
876 883 It is defined as
877 884 .Sy typedef
878 885 .Ft int
879 886 .Fo proc_map_f
880 887 .Fa "void *"
881 888 .Fa "const prmap_t *"
882 889 .Fa "const char *"
883 890 .Fc .
884 891 The first argument is a pointer to an argument that the user specifies.
885 892 The second argument is describes the mapping information and is defined
886 893 in
887 894 .Xr proc 5 .
888 895 The final argument contains the name of the mapping or object file in
889 896 question.
890 897 For additional information on using this type, see
891 898 .Xr Pmapping_iter 3PROC .
892 899 .Pp
893 900 .Vt proc_env_f
894 901 .Pp
895 902 The
896 903 .Vt proc_env_f
897 904 is a function pointer type that is used with the
898 905 .Fn Penv_iter
899 906 function.
900 907 It is defined as
901 908 .Sy typedef
902 909 .Ft int
903 910 .Fo proc_env_f
904 911 .Fa "void *"
905 912 .Fa "struct ps_prochandle *"
906 913 .Fa "uintptr_t"
907 914 .Fa "const char *"
908 915 .Fc .
909 916 The first argument is a pointer to an argument that the user specifies.
910 917 The second argument is a pointer to the
911 918 .Vt struct ps_prochandle
912 919 that the callback was passed to.
913 920 The third argument is the address of the environment variable in the process.
914 921 The fourth argument is the environment variable.
915 922 Values in the environment follow the convention of the form
916 923 .Em variable=value .
917 924 For more information on environment variables see
918 925 .Xr exec 2
919 926 and
920 927 .Xr environ 7 .
921 928 For additional information on using this type, see
922 929 .Xr Penv_iter 3PROC .
923 930 .Pp
924 931 .Vt proc_sym_f
925 932 .Pp
926 933 The
927 934 .Vt proc_sym_f
928 935 is a function pointer type that is used with the
929 936 .Fn Psmbol_iter ,
930 937 .Fn Psymbol_iter_by_addr ,
931 938 .Fn Psymbol_iter_by_name ,
932 939 and
933 940 .Fn Psymbol_iter_by_lmid
934 941 functions.
935 942 It is defined as
936 943 .Sy typedef
937 944 .Ft int
938 945 .Fo proc_sym_f
939 946 .Fa "void *"
940 947 .Fa "const GElf_Sym *"
941 948 .Fa "const char *"
942 949 .Fc .
943 950 The first argument is a pointer to an argument that the user supplies.
944 951 The second argument is a pointer to the ELF symbol information in a
945 952 32-bit and 64-bit neutral form.
946 953 See
947 954 .Xr elf 3ELF
948 955 and
949 956 .Xr gelf 3ELF
950 957 for more information on it.
951 958 The final argument points to a character string that has the name of the symbol.
952 959 For additional information on using this type, see
953 960 .Xr Psymbol_iter 3PROC ,
954 961 .Xr Psymbol_iter_by_addr 3PROC ,
955 962 .Xr Psymbol_iter_by_name 3PROC ,
956 963 and
957 964 .Xr Psymbol_iter_by_lmid 3PROC .
958 965 .Pp
959 966 .Vt proc_xsym_f
960 967 .Pp
961 968 The
962 969 .Vt proc_xsym_f
963 970 is a function pointer type that is used with the
964 971 .Fn Pxsymbol_iter
965 972 function.
966 973 It is defined as
967 974 .Sy typedef
968 975 .Ft int
969 976 .Fo proc_xsym_f
970 977 .Fa "void *"
971 978 .Fa "const GElf_Sym *"
972 979 .Fa "const char *"
973 980 .Fa "const prsyminfo_t *"
974 981 .Fc .
975 982 The first three arguments are identical to those of
976 983 .Vt proc_sym_f .
977 984 The final argument contains additional information about the symbol
978 985 itself.
979 986 The members of the
980 987 .Vt prsyminfo_t
981 988 are defined earlier in this section.
982 989 For additional information on using this type, see
983 990 .Xr Pxsymbol_iter 3PROC .
984 991 .Pp
985 992 .Vt proc_stack_f
986 993 .Pp
987 994 The
988 995 .Vt proc_stack_f
989 996 is a function pointer type that is used with the
990 997 .Fn Pstack_iter
991 998 function.
992 999 It is defined as
993 1000 .Sy typedef
994 1001 .Ft int
995 1002 .Fo proc_stack_f
996 1003 .Fa "void *"
997 1004 .Fa "prgregset_t"
998 1005 .Fa "uint_t"
999 1006 .Fa "const long *"
1000 1007 .Fc .
1001 1008 The first argument is a pointer to an argument that the user specifies.
1002 1009 The second argument's contents are platform specific.
1003 1010 The registers that contain stack information, usually the stack pointer and
1004 1011 frame pointer, will be filled in to point to an entry.
1005 1012 The
1006 1013 .Vt prgregset_t
1007 1014 is defined in
1008 1015 .Xr proc 5 .
1009 1016 .Pp
1010 1017 The third argument contains the number of arguments to the current stack
1011 1018 frame and the fourth argument contains an array of addresses that
1012 1019 correspond to the arguments to that stack function.
1013 1020 The value of the third argument dictates the number of entries in the fourth
1014 1021 argument.
1015 1022 For additional information on using this type, see
1016 1023 .Xr Pstack_iter 3PROC .
1017 1024 .Pp
1018 1025 .Vt proc_fdinfo_f
1019 1026 .Pp
1020 1027 The
1021 1028 .Vt proc_fdinfo_f
1022 1029 is a function pointer type that is used with the
1023 1030 .Fn Pfdinfo_iter
1024 1031 function.
1025 1032 It is defined as
1026 1033 .Sy typedef
1027 1034 .Ft int
1028 1035 .Fo proc_fdinfo_f
1029 1036 .Fa "void *"
1030 1037 .Fa "prfdinfo_t *"
1031 1038 .Fc .
1032 1039 The first argument is a pointer to an argument that the user specifies.
1033 1040 The second argument contains information about an open file descriptor.
1034 1041 The members of the
1035 1042 .Vt prfdinfo_t
1036 1043 are defined earlier in this section.
1037 1044 For additional information on using this type, see
1038 1045 .Xr Pfdinfo_iter 3PROC .
1039 1046 .Sh PROGRAMMING NOTES
1040 1047 When working with live processes, whether from the
1041 1048 .Xr Pgrab 3PROC
1042 1049 or
1043 1050 .Xr Pcreate 3PROC
1044 1051 family of functions, there are some additional considerations.
1045 1052 Importantly, if a process calls any of the
1046 1053 .Xr exec 2
1047 1054 suite of functions, much of the state information that is obtained,
1048 1055 particularly that about mappings in the process will be invalid.
1049 1056 Callers must ensure that they call
1050 1057 .Xr Preset_maps 3PROC
1051 1058 when they hold a process handle across an exec.
1052 1059 In addition, users of the library should familiarize themselves with the
1053 1060 .Sy PROGRAMMING NOTES
1054 1061 section of the
1055 1062 .Xr proc 5
1056 1063 manual page, which discusses issues of privileges and security.
1057 1064 .Sh DEBUGGING
1058 1065 The library provides a means for obtaining additional debugging
1059 1066 information.
1060 1067 The output itself is not part of the
1061 1068 .Nm
1062 1069 library's stable interface.
1063 1070 Setting the environment variable
1064 1071 .Ev LIBPROC_DEBUG
1065 1072 to some value will print information to standard error.
1066 1073 For example,
1067 1074 .Ev LIBPROC_DEBUG Ns = Ns Em please .
1068 1075 .Sh LOCKING
1069 1076 Most functions operate on a handle to a process in the form of a
1070 1077 .Vt "struct ps_prochandle *" .
1071 1078 Unless otherwise indicated, the library does not provide any
1072 1079 synchronization for different routines that are operating on the
1073 1080 .Sy same
1074 1081 .Nm
1075 1082 library handle.
1076 1083 It is up to the caller to ensure that only a single thread is using a handle at
1077 1084 any given time.
1078 1085 Multiple threads may call
1079 1086 .Nm
1080 1087 library routines at the same time as long as each thread is using a
1081 1088 different handle.
1082 1089 .Pp
1083 1090 Each individual function notes its
1084 1091 .Sy MT-Level
1085 1092 section.
1086 1093 The MT-Level of a routine that matches the above description will refer to this
1087 1094 manual page.
1088 1095 If it does not, then it refers to the standard attributes in
1089 1096 .Xr attributes 7 .
1090 1097 .Sh INTERFACE STABILITY
1091 1098 .Sy Uncommitted
1092 1099 .Pp
1093 1100 While the library is considered an uncommitted interface, and is still
1094 1101 evolving, changes that break compatibility have been uncommon and this
1095 1102 trend is expected to continue.
1096 1103 It is documented to allow consumers, whether part of illumos or outside of it,
1097 1104 to understand the library and make use of it with the understanding that
1098 1105 changes may occur which break both source and binary compatibility.
1099 1106 .Sh SEE ALSO
1100 1107 .Xr gcore 1 ,
1101 1108 .Xr mdb 1 ,
1102 1109 .Xr proc 1 ,
1103 1110 .Xr ps 1 ,
1104 1111 .Xr exec 2 ,
1105 1112 .Xr fcntl 2 ,
1106 1113 .Xr stat 2 ,
1107 1114 .Xr Intro 3 ,
1108 1115 .Xr dlopen 3C ,
1109 1116 .Xr elf 3ELF ,
1110 1117 .Xr ctf 5 ,
1111 1118 .Xr proc 5 ,
1112 1119 .Xr attributes 7 ,
1113 1120 .Xr environ 7 ,
1114 1121 .Xr privileges 7 ,
1115 1122 .Xr coreadm 8
1116 1123 .Pp
1117 1124 .Rs
1118 1125 .%T Linkers and Libraries Guide
1119 1126 .Re
1120 1127 .Pp
1121 1128 .Xr Lfree 3PROC ,
1122 1129 .Xr Lgrab 3PROC ,
1123 1130 .Xr Lgrab_error 3PROC ,
1124 1131 .Xr Pcreate 3PROC ,
1125 1132 .Xr Pcreate_agent 3PROC ,
1126 1133 .Xr Pcreate_callback 3PROC ,
1127 1134 .Xr Pcreate_error 3PROC ,
1128 1135 .Xr Pdestroy_agent 3PROC ,
1129 1136 .Xr Pfgrab_core 3PROC ,
1130 1137 .Xr Pfree 3PROC ,
1131 1138 .Xr Pgrab 3PROC ,
1132 1139 .Xr Pgrab_core 3PROC ,
1133 1140 .Xr Pgrab_error 3PROC ,
1134 1141 .Xr Pgrab_file 3PROC ,
1135 1142 .Xr Pgrab_ops 3PROC ,
1136 1143 .Xr Prelease 3PROC ,
1137 1144 .Xr Preopen 3PROC ,
1138 1145 .Xr Pxcreate 3PROC
1139 1146 .Pp
1140 1147 .Xr Paddr_to_ctf 3PROC ,
1141 1148 .Xr Paddr_to_loadobj 3PROC ,
1142 1149 .Xr Paddr_to_map 3PROC ,
1143 1150 .Xr Paddr_to_text_map 3PROC ,
1144 1151 .Xr Pasfd 3PROC ,
1145 1152 .Xr Pclearfault 3PROC ,
1146 1153 .Xr Pclearsig 3PROC ,
1147 1154 .Xr Pcontent 3PROC ,
1148 1155 .Xr Pcred 3PROC ,
1149 1156 .Xr Pctlfd 3PROC ,
1150 1157 .Xr Pdelbkpt 3PROC ,
1151 1158 .Xr Pdelwapt 3PROC ,
1152 1159 .Xr Pdstop 3PROC ,
1153 1160 .Xr Pexecname 3PROC ,
1154 1161 .Xr Pfault 3PROC ,
1155 1162 .Xr Pfgcore 3PROC ,
1156 1163 .Xr Pgcore 3PROC ,
1157 1164 .Xr Pgetareg 3PROC ,
1158 1165 .Xr Pgetauxval 3PROC ,
1159 1166 .Xr Pgetauxvec 3PROC ,
1160 1167 .Xr Pgetenv 3PROC ,
1161 1168 .Xr Pisprocdir 3PROC ,
1162 1169 .Xr Pissyscall_prev 3PROC ,
1163 1170 .Xr Plmid 3PROC ,
1164 1171 .Xr Plmid_to_loadobj 3PROC ,
1165 1172 .Xr Plmid_to_map 3PROC ,
1166 1173 .Xr Plookup_by_addr 3PROC ,
1167 1174 .Xr Plookup_by_name 3PROC ,
1168 1175 .Xr Plwp_alt_stack 3PROC ,
1169 1176 .Xr Plwp_getfpregs 3PROC ,
1170 1177 .Xr Plwp_getpsinfo 3PROC ,
1171 1178 .Xr Plwp_getregs 3PROC ,
1172 1179 .Xr Plwp_getspymaster 3PROC ,
1173 1180 .Xr Plwp_main_stack 3PROC ,
1174 1181 .Xr Plwp_setfpregs 3PROC ,
1175 1182 .Xr Plwp_setregs 3PROC ,
1176 1183 .Xr Plwp_stack 3PROC ,
1177 1184 .Xr Pname_to_ctf 3PROC ,
1178 1185 .Xr Pname_to_loadobj 3PROC ,
1179 1186 .Xr Pname_to_map 3PROC ,
1180 1187 .Xr Pobjname 3PROC ,
1181 1188 .Xr Pobjname_resolved 3PROC ,
1182 1189 .Xr Pplatform 3PROC ,
1183 1190 .Xr Ppltdest 3PROC ,
1184 1191 .Xr Ppriv 3PROC ,
1185 1192 .Xr Ppsinfo 3PROC ,
1186 1193 .Xr Pputareg 3PROC ,
1187 1194 .Xr Prd_agent 3PROC ,
1188 1195 .Xr Pread 3PROC ,
1189 1196 .Xr Pread_string 3PROC ,
1190 1197 .Xr Preset_maps 3PROC ,
1191 1198 .Xr Psecflags 3PROC ,
1192 1199 .Xr Psetbkpt 3PROC ,
1193 1200 .Xr Psetcred 3PROC ,
1194 1201 .Xr Psetfault 3PROC ,
1195 1202 .Xr Psetflags 3PROC ,
1196 1203 .Xr Psetpriv 3PROC ,
1197 1204 .Xr Psetrun 3PROC ,
1198 1205 .Xr Psetsignal 3PROC ,
1199 1206 .Xr Psetsysentry 3PROC ,
1200 1207 .Xr Psetsysexit 3PROC ,
1201 1208 .Xr Psetwapt 3PROC ,
1202 1209 .Xr Psetzoneid 3PROC ,
1203 1210 .Xr Psignal 3PROC ,
1204 1211 .Xr Pstate 3PROC ,
1205 1212 .Xr Pstatus 3PROC ,
1206 1213 .Xr Pstop 3PROC ,
1207 1214 .Xr Pstopstatus 3PROC ,
1208 1215 .Xr Psync 3PROC ,
1209 1216 .Xr Psysentry 3PROC ,
1210 1217 .Xr Psysexit 3PROC ,
1211 1218 .Xr Puname 3PROC ,
1212 1219 .Xr Pupanic 3PROC ,
1213 1220 .Xr Pupanic_free 3PROC ,
1214 1221 .Xr Punsetflags 3PROC ,
1215 1222 .Xr Pupdate_maps 3PROC ,
1216 1223 .Xr Pupdate_syms 3PROC ,
1217 1224 .Xr Pwait 3PROC ,
1218 1225 .Xr Pwrite 3PROC ,
1219 1226 .Xr Pxecbkpt 3PROC ,
1220 1227 .Xr Pxecwapt 3PROC ,
1221 1228 .Xr Pxlookup_by_addr 3PROC ,
1222 1229 .Xr Pxlookup_by_addr_resolved 3PROC ,
1223 1230 .Xr Pxlookup_by_name 3PROC ,
1224 1231 .Xr Pzonename 3PROC ,
1225 1232 .Xr Pzonepath 3PROC ,
1226 1233 .Xr Pzoneroot 3PROC
1227 1234 .Pp
1228 1235 .Xr Lalt_stack 3PROC ,
1229 1236 .Xr Lclearfault 3PROC ,
1230 1237 .Xr Lclearsig 3PROC ,
1231 1238 .Xr Lctlfd 3PROC ,
1232 1239 .Xr Ldstop 3PROC ,
1233 1240 .Xr Lgetareg 3PROC ,
1234 1241 .Xr Lmain_stack 3PROC ,
1235 1242 .Xr Lprochandle 3PROC ,
1236 1243 .Xr Lpsinfo 3PROC ,
1237 1244 .Xr Lputareg 3PROC ,
1238 1245 .Xr Lsetrun 3PROC ,
1239 1246 .Xr Lstack 3PROC ,
1240 1247 .Xr Lstate 3PROC ,
1241 1248 .Xr Lstatus 3PROC ,
1242 1249 .Xr Lstop 3PROC ,
1243 1250 .Xr Lsync 3PROC ,
1244 1251 .Xr Lwait 3PROC ,
1245 1252 .Xr Lxecbkpt 3PROC ,
1246 1253 .Xr Lxecwapt 3PROC
1247 1254 .Pp
1248 1255 .Xr pr_access 3PROC ,
1249 1256 .Xr pr_close 3PROC ,
1250 1257 .Xr pr_creat 3PROC ,
1251 1258 .Xr pr_door_info 3PROC ,
1252 1259 .Xr pr_exit 3PROC ,
1253 1260 .Xr pr_fcntl 3PROC ,
1254 1261 .Xr pr_fstat 3PROC ,
1255 1262 .Xr pr_fstat64 3PROC ,
1256 1263 .Xr pr_fstatvfs 3PROC ,
1257 1264 .Xr pr_getitimer 3PROC ,
1258 1265 .Xr pr_getpeername 3PROC ,
1259 1266 .Xr pr_getpeerucred 3PROC ,
1260 1267 .Xr pr_getprojid 3PROC ,
1261 1268 .Xr pr_getrctl 3PROC ,
1262 1269 .Xr pr_getrlimit 3PROC ,
1263 1270 .Xr pr_getrlimit64 3PROC ,
1264 1271 .Xr pr_getsockname 3PROC ,
1265 1272 .Xr pr_getsockopt 3PROC ,
1266 1273 .Xr pr_gettaskid 3PROC ,
1267 1274 .Xr pr_getzoneid 3PROC ,
1268 1275 .Xr pr_ioctl 3PROC ,
1269 1276 .Xr pr_link 3PROC ,
1270 1277 .Xr pr_llseek 3PROC ,
1271 1278 .Xr pr_lseek 3PROC ,
1272 1279 .Xr pr_lstat 3PROC ,
1273 1280 .Xr pr_lstat64 3PROC ,
1274 1281 .Xr pr_memcntl 3PROC ,
1275 1282 .Xr pr_meminfo 3PROC ,
1276 1283 .Xr pr_mmap 3PROC ,
1277 1284 .Xr pr_munmap 3PROC ,
1278 1285 .Xr pr_open 3PROC ,
1279 1286 .Xr pr_processor_bind 3PROC ,
1280 1287 .Xr pr_rename 3PROC ,
1281 1288 .Xr pr_setitimer 3PROC ,
1282 1289 .Xr pr_setrctl 3PROC ,
1283 1290 .Xr pr_setrlimit 3PROC ,
1284 1291 .Xr pr_setrlimit64 3PROC ,
1285 1292 .Xr pr_settaskid 3PROC ,
1286 1293 .Xr pr_sigaction 3PROC ,
1287 1294 .Xr pr_stat 3PROC ,
1288 1295 .Xr pr_stat64 3PROC ,
1289 1296 .Xr pr_statvfs 3PROC ,
1290 1297 .Xr pr_unlink 3PROC ,
1291 1298 .Xr pr_waitid 3PROC ,
1292 1299 .Pp
1293 1300 .Xr Penv_iter 3PROC ,
1294 1301 .Xr Plwp_iter 3PROC ,
1295 1302 .Xr Plwp_iter_all 3PROC ,
1296 1303 .Xr Pmapping_iter 3PROC ,
1297 1304 .Xr Pmapping_iter_resolved 3PROC ,
1298 1305 .Xr Pobject_iter 3PROC ,
1299 1306 .Xr Pobject_iter_resolved 3PROC ,
1300 1307 .Xr Pstack_iter 3PROC ,
1301 1308 .Xr Psymbol_iter 3PROC ,
1302 1309 .Xr Psymbol_iter_by_addr 3PROC ,
1303 1310 .Xr Psymbol_iter_by_lmid 3PROC ,
1304 1311 .Xr Psymbol_iter_by_name 3PROC ,
1305 1312 .Xr Pxsymbol_iter 3PROC ,
1306 1313 .Xr Pfdinfo_iter 3PROC
1307 1314 .Pp
1308 1315 .Xr Perror_printf 3PROC ,
1309 1316 .Xr proc_arg_grab 3PROC ,
1310 1317 .Xr proc_arg_psinfo 3PROC ,
1311 1318 .Xr proc_arg_xgrab 3PROC ,
1312 1319 .Xr proc_arg_xpsinfo 3PROC ,
1313 1320 .Xr proc_content2str 3PROC ,
1314 1321 .Xr proc_dmodelname 3PROC ,
1315 1322 .Xr proc_finistdio 3PROC ,
1316 1323 .Xr proc_fltname 3PROC ,
1317 1324 .Xr proc_fltset2str 3PROC ,
1318 1325 .Xr proc_flushstdio 3PROC ,
1319 1326 .Xr proc_get_auxv 3PROC ,
1320 1327 .Xr proc_get_cred 3PROC ,
1321 1328 .Xr proc_get_fdinfo 3PROC ,
1322 1329 .Xr proc_get_priv 3PROC ,
1323 1330 .Xr proc_get_psinfo 3PROC ,
1324 1331 .Xr proc_get_status 3PROC ,
1325 1332 .Xr proc_initstdio 3PROC ,
1326 1333 .Xr proc_lwp_in_set 3PROC ,
1327 1334 .Xr proc_lwp_range_valid 3PROC ,
1328 1335 .Xr proc_signame 3PROC ,
1329 1336 .Xr proc_sigset2str 3PROC ,
1330 1337 .Xr proc_str2content 3PROC ,
1331 1338 .Xr proc_str2flt 3PROC ,
1332 1339 .Xr proc_str2fltset 3PROC ,
1333 1340 .Xr proc_str2sig 3PROC ,
1334 1341 .Xr proc_str2sigset 3PROC ,
1335 1342 .Xr proc_str2sys 3PROC ,
1336 1343 .Xr proc_str2sysset 3PROC ,
1337 1344 .Xr proc_sysname 3PROC ,
1338 1345 .Xr proc_sysset2str 3PROC ,
1339 1346 .Xr proc_unctrl_psinfo 3PROC ,
1340 1347 .Xr proc_fdinfowalk 3PROC ,
1341 1348 .Xr proc_fdwalk 3PROC ,
1342 1349 .Xr proc_walk 3PROC
1343 1350 .Pp
1344 1351 .Xr Pldt 3PROC ,
1345 1352 .Xr proc_get_ldt 3PROC ,
1346 1353 .Pp
1347 1354 .Xr Plwp_getgwindows 3PROC ,
1348 1355 .Xr Plwp_getxregs 3PROC ,
1349 1356 .Xr Plwp_setxregs 3PROC ,
1350 1357 .Pp
1351 1358 .Xr Plwp_getasrs 3PROC ,
1352 1359 .Xr Plwp_setasrs 3PROC
|
↓ open down ↓ |
1000 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX