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