2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
19 .Nd process control library
26 library provides consumers a general series of interfaces to inspect
27 and control both live processes and core files.
28 It is intended for introspection tools such as debuggers by providing a
29 high-level interface to the /proc file system
34 library provides interfaces that focus on:
35 .Bl -bullet -offset indent
37 Creating and attaching to live process, core files, and arbitrary ELF
40 Interrogating the state of a process or core file.
42 Manipulating the current state of a process or thread.
44 Interrogating the state of threads of a process or core file.
46 Running system calls in the context of another process.
48 Various utilities for iterating process and core file file descriptors,
49 mappings, symbols, and more.
51 Various utilities to support debugging tools.
56 library can be used to manipulate running processes and to create new
58 To manipulate an existing process first
63 A process is generally stopped as a side effect of grabbing it.
64 Callers must exercise caution, as if they do not use the library correctly, or
65 they terminate unexpectedly, a process may remain stopped.
67 Unprivileged users may only grab their own processes.
68 Users with the privilege
70 may manipulate processes that they do not own; however, additional
71 restrictions as described in
79 functions may be used to create processes which are always controlled by
84 library has the ability to open and interpret core files produced by
85 processes on the system.
86 Process core dump generation is controlled by the
89 In addition, the library has the ability to understand and interpret core dumps
90 generated by Linux kernel and can provide a subset of its functionality on such
91 core files, provided the original binary is also present.
93 Not all functions in the
95 library are valid for core files.
96 In general, none of the commands which manipulate the current state of a process
97 or thread or that try to force system calls on a victim process will work.
98 Furthermore several of the information and iteration interfaces are limited
99 based on the data that is available in the core file.
100 For example, if the core file is of a process that omits the frame pointer, the
101 ability to iterate the stack will be limited.
107 function to open a core file.
110 function to open an ELF object file.
111 This is useful for obtaining information stored in ELF headers and
113 .Ss Debug Information
114 Many of the operations in the library rely on debug information being
115 present in a process and its associated libraries.
116 The library leverages symbol table information, CTF data
118 sections, and frame unwinding information based on the use of an ABI
119 defined frame pointer, eg.
125 Some software providers strip programs of this information or build
126 their executables such that the information will not be present in a
128 To deal with this fact, the library is able to consume information that is not
129 present in the core file or the running process.
130 It can both consume it from the underlying executable and it also supports
131 finding it from related ELF objects that are linked to it via the
134 .Sy .note.gnu.build-id
136 .Ss Iteration Interfaces
139 library provides the ability to iterate over the following aspects of a
140 process or core file:
141 .Bl -bullet -offset indent
145 Active and zombie threads
147 All non-system processes
151 All objects in a process
161 .Ss System Call Injection
164 library allows the caller to force system calls to be executed in the
165 context of the running process.
166 This can be used both as a tool for introspection, allowing one to get
167 information outside its current context as well as performing modifications to a
170 These functions run in the context of the calling process.
171 This is often an easier way of getting non-exported information about a
172 process from the system.
175 command uses this interface to get more detailed information about a
176 process's open file descriptors, which it would not have access to
181 provides the public interfaces defined below.
184 for additional information on shared object interfaces.
185 Functions are organized into categories that describe their purpose.
186 Individual functions are documented in their own manual pages.
187 .Ss Creation, Grabbing, and Releasing
188 The following routines are related to creating library handles,
189 grabbing cores, processes, and threads, and releasing those resources.
190 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
191 .It Sy Lfree Ta Sy Lgrab
192 .It Sy Lgrab_error Ta Sy Pcreate
193 .It Sy Pcreate_agent Ta Sy Pcreate_callback
194 .It Sy Pcreate_error Ta Sy Pdestroy_agent
195 .It Sy Pfgrab_core Ta Sy Pfree
196 .It Sy Pgrab Ta Sy Pgrab_core
197 .It Sy Pgrab_error Ta Sy Pgrab_file
198 .It Sy Pgrab_ops Ta Sy Prelease
199 .It Sy Preopen Ta Sy Pxcreate
201 .Ss Process interrogation and manipulation
202 The following routines obtain information about a process and allow
203 manipulation of the process itself.
204 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
205 .It Sy Paddr_to_ctf Ta Sy Paddr_to_loadobj
206 .It Sy Paddr_to_map Ta Sy Paddr_to_text_map
207 .It Sy Pasfd Ta Sy Pclearfault
208 .It Sy Pclearsig Ta Sy Pcontent
209 .It Sy Pcred Ta Sy Pctlfd
210 .It Sy Pdelbkpt Ta Sy Pdelwapt
211 .It Sy Pdstop Ta Sy Pexecname
212 .It Sy Pfault Ta Sy Pfgcore
213 .It Sy Pgcore Ta Sy Pgetareg
214 .It Sy Pgetauxval Ta Sy Pgetauxvec
215 .It Sy Pgetenv Ta Sy Pisprocdir
216 .It Sy Pissyscall_prev Ta Sy Plmid
217 .It Sy Plmid_to_loadobj Ta Sy Plmid_to_map
218 .It Sy Plookup_by_addr Ta Sy Plookup_by_name
219 .It Sy Plwp_alt_stack Ta Sy Plwp_getfpregs
220 .It Sy Plwp_getpsinfo Ta Sy Plwp_getregs
221 .It Sy Plwp_getspymaster Ta Sy Plwp_main_stack
222 .It Sy Plwp_setfpregs Ta Sy Plwp_setregs
223 .It Sy Plwp_stack Ta Sy Pname_to_ctf
224 .It Sy Pname_to_loadobj Ta Sy Pname_to_map
225 .It Sy Pobjname Ta Sy Pobjname_resolved
226 .It Sy Pplatform Ta Sy Ppltdest
227 .It Sy Ppriv Ta Sy Ppsinfo
228 .It Sy Pputareg Ta Sy Prd_agent
229 .It Sy Pread Ta Sy Pread_string
230 .It Sy Preset_maps Ta Sy Psetbkpt
231 .It Sy Psecflags Ta Sy Psetcred
232 .It Sy Psetfault Ta Sy Psetflags
233 .It Sy Psetpriv Ta Sy Psetrun
234 .It Sy Psetsignal Ta Sy Psetsysentry
235 .It Sy Psetsysexit Ta Sy Psetwapt
236 .It Sy Psetzoneid Ta Sy Psignal
237 .It Sy Pstate Ta Sy Pstatus
238 .It Sy Pstop Ta Sy Pstopstatus
239 .It Sy Psync Ta Sy Psysentry
240 .It Sy Psysexit Ta Sy Puname
241 .It Sy Punsetflags Ta Sy Pupdate_maps
242 .It Sy Pupdate_syms Ta Sy Pwait
243 .It Sy Pwrite Ta Sy Pxecbkpt
244 .It Sy Pxecwapt Ta Sy Pxlookup_by_addr
245 .It Sy Pxlookup_by_addr_resolved Ta Sy Pxlookup_by_name
246 .It Sy Pzonename Ta Sy Pzonepath
249 .Ss Thread interrogation and manipulation
250 The following routines obtain information about a thread and allow
251 manipulation of the thread itself.
252 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
253 .It Sy Lalt_stack Ta Sy Lclearfault
254 .It Sy Lclearsig Ta Sy Lctlfd
255 .It Sy Ldstop Ta Sy Lgetareg
256 .It Sy Lmain_stack Ta Sy Lprochandle
257 .It Sy Lpsinfo Ta Sy Lputareg
258 .It Sy Lsetrun Ta Sy Lstack
259 .It Sy Lstate Ta Sy Lstatus
260 .It Sy Lstop Ta Sy Lsync
261 .It Sy Lwait Ta Sy Lxecbkpt
262 .It Sy Lxecwapt Ta ""
264 .Ss System Call Injection
265 The following routines are used to inject specific system calls and have
266 them run in the context of a process.
267 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
268 .It Sy pr_access Ta Sy pr_close
269 .It Sy pr_creat Ta Sy pr_door_info
270 .It Sy pr_exit Ta Sy pr_fcntl
271 .It Sy pr_fstat Ta Sy pr_fstat64
272 .It Sy pr_fstatvfs Ta Sy pr_getitimer
273 .It Sy pr_getpeername Ta Sy pr_getpeerucred
274 .It Sy pr_getprojid Ta Sy pr_getrctl
275 .It Sy pr_getrlimit Ta Sy pr_getrlimit64
276 .It Sy pr_getsockname Ta Sy pr_getsockopt
277 .It Sy pr_gettaskid Ta Sy pr_getzoneid
278 .It Sy pr_ioctl Ta Sy pr_link
279 .It Sy pr_llseek Ta Sy pr_lseek
280 .It Sy pr_lstat Ta Sy pr_lstat64
281 .It Sy pr_memcntl Ta Sy pr_meminfo
282 .It Sy pr_mmap Ta Sy pr_munmap
283 .It Sy pr_open Ta Sy pr_processor_bind
284 .It Sy pr_rename Ta Sy pr_setitimer
285 .It Sy pr_setrctl Ta Sy pr_setrlimit
286 .It Sy pr_setrlimit64 Ta Sy pr_settaskid
287 .It Sy pr_sigaction Ta Sy pr_stat
288 .It Sy pr_stat64 Ta Sy pr_statvfs
289 .It Sy pr_unlink Ta Sy pr_waitid
291 .Ss Iteration routines
292 These routines are used to iterate over the contents of a process.
293 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
294 .It Sy Penv_iter Ta Sy Plwp_iter
295 .It Sy Plwp_iter_all Ta Sy Pmapping_iter
296 .It Sy Pmapping_iter_resolved Ta Sy Pobject_iter
297 .It Sy Pobject_iter_resolved Ta Sy Pstack_iter
298 .It Sy Psymbol_iter Ta Sy Psymbol_iter_by_addr
299 .It Sy Psymbol_iter_by_lmid Ta Sy Psymbol_iter_by_name
300 .It Sy Pxsymbol_iter Ta Sy Pfdinfo_iter
303 The following routines are utilities that are useful to consumers of the
305 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
306 .It Sy Perror_printf Ta Sy proc_arg_grab
307 .It Sy proc_arg_psinfo Ta Sy proc_arg_xgrab
308 .It Sy proc_arg_xpsinfo Ta Sy proc_content2str
309 .It Sy proc_finistdio Ta Sy proc_fltname
310 .It Sy proc_fltset2str Ta Sy proc_flushstdio
311 .It Sy proc_get_auxv Ta Sy proc_get_cred
312 .It Sy proc_get_priv Ta Sy proc_get_psinfo
313 .It Sy proc_get_status Ta Sy proc_initstdio
314 .It Sy proc_lwp_in_set Ta Sy proc_lwp_range_valid
315 .It Sy proc_signame Ta Sy proc_sigset2str
316 .It Sy proc_str2content Ta Sy proc_str2flt
317 .It Sy proc_str2fltset Ta Sy proc_str2sig
318 .It Sy proc_str2sigset Ta Sy proc_str2sys
319 .It Sy proc_str2sysset Ta Sy proc_sysname
320 .It Sy proc_sysset2str Ta Sy proc_unctrl_psinfo
321 .It Sy proc_walk Ta ""
323 .Ss x86 Specific Routines
324 The following routines are specific to the x86, 32-bit and 64-bit,
328 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
329 .It Sy Pldt Ta Sy proc_get_ldt
331 .Ss SPARC specific Routines
332 The following functions are specific to the SPARC, 32-bit and 64-bit,
336 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
337 .It Sy Plwp_getgwindows Ta Sy Plwp_getxregs
338 .It Sy Plwp_setxregs Ta Sy ""
341 The following functions are specific to the 64-bit SPARC version of the
344 .Bl -column -offset indent ".Sy Pmapping_iter_resolved" ".Sy Psymbol_iter_by_addr"
345 .It Sy Plwp_getasrs Ta Sy Plwp_setasrs
348 Every process handle that exists in
351 In some cases, such as for core files, these states are static.
352 In other cases, such as handles that correspond to a running process or a
353 created process, these states are dynamic and change based on actions taken in
355 The state can be obtained with the
359 The various states are:
360 .Bl -tag -width Dv -offset indent
362 An actively running process.
363 This may be a process that was obtained by creating it with functions such as
365 or by grabbing an existing process such as
368 An active process that is no longer executing.
369 A process may stop for many reasons such as an explicit stop request (through
371 for example) or if a tracing event is hit.
373 The reason a process is stopped may be obtained through the thread's
375 structure read directly from /proc or obtained through the
379 Control over the process has been lost.
380 This may happen when the process executes a new image requiring a different set
382 To resume control call
384 For more information on losing control of a process, see
388 It has terminated, but it has not been cleaned up yet by its parent.
389 For more on the conditions of becoming a zombie, see
392 Processes in this state are always core files.
393 See the earlier section
395 for more information on working with core files.
397 A process that has never been run.
398 This is always the case for handles that refer to files as the files cannot be
400 Those process handles are obtained through calling
401 .Xr Pgrab_file 3PROC .
404 Many functions relating to tracing processes, for example
406 .Xr Psetsignal 3PROC ,
407 .Xr Psetfault 3PROC ,
408 .Xr Psetentry 3PROC ,
409 and others, mention that they only act upon
410 .Em Active Processes .
411 This specifically refers to processes whose state are in
415 Process handles in the other states have no notion of settable tracing
416 flags, though core files
417 .Pf ( type Dv PS_DEAD ) ,
419 may have a read-only snapshot of their tracing settings available.
423 library uses many types that come from the /proc file system
426 .Pf ( Xr elf 3ELF ) .
427 However, it also defines the following types:
429 .Sy struct ps_prochandle
432 .Sy struct ps_prochandle
433 is an opaque handle to the library and the core element of control for a
435 Consumers obtain pointers to a handle through the use of the
438 and related functions.
439 When a caller is done with a handle, then it should call one of the
443 functions to relinquish the handle, release associated resources, and
444 potentially set the process to run again.
446 .Sy struct ps_lwphandle
449 .Sy struct ps_lwphandle
451 .Sy struct ps_prochandle ,
452 but it represents the control of an individual thread, rather than a
454 Consumers obtain pointers to a handle through the
456 function and relinquish it with the
464 is a value which describes the various content types of core files.
465 These are used in functions such as
469 to describe and control the types of content that get included.
470 Various content types may be included together through a bitwise-inclusive-OR.
471 The default system core contents are controlled with the
474 The following table lists the current set of core contents in the system, though
475 the set may increase over time.
476 The string after the macro is the human readable string that corresponds with
477 the constant and is used by
479 .Xr proc_content2str 3PROC ,
481 .Xr proc_str2content 3PROC .
482 .Bl -tag -offset indent -width indent
483 .It Dv CC_CONTENT_STACK ("stack")
484 The contents include the process stack.
485 Note, this only covers the main thread's stack.
486 The stack of other threads is covered by
487 .Dv CC_CONTENT_ANON .
488 .It Dv CC_CONTENT_HEAP ("heap")
489 The contents include the process heap.
490 .It Dv CC_CONTENT_SHFILE ("shfile")
491 The contents include shared mappings that are backed by files (e.g.
497 .It Dv CC_CONTENT_SHANNON ("shannon")
498 The contents include shared mappings that are backed by anonymous memory
506 .It Dv CC_CONTENT_RODATA ("rodata")
507 The contents include private read-only file mappings, such as shared
509 .It Dv CC_CONTENT_ANON ("anon")
510 The contents include private anonymous mappings.
511 This includes the stacks of threads which are not the main thread.
512 .It Dv CC_CONTENT_SHM ("shm")
513 The contents include system V shared memory.
514 .It Dv CC_CONTENT_ISM ("ism")
515 The contents include ISM (intimate shared memory) mappings.
516 .It Dv CC_CONTENT_DISM ("dism")
517 The contents include DISM (dynamic shared memory) mappings.
518 .It Dv CC_CONTENT_CTF ("ctf")
521 (Compact C Type Format) information.
522 Note, not all objects in the process may have CTF information available.
523 .It Dv CC_CONTENT_SYMTAB ("symtab")
524 The contents include the symbol table.
525 Note, not all objects in the process may have a symbol table available.
526 .It Dv CC_CONTENT_ALL ("all")
527 This value indicates that all of the above content values are present.
528 Note that additional values may be added in the future, in which case
529 the value of the symbol will be updated to include them.
532 should validate all the expected bits are set by an expression such as
533 .Li (c & CC_CONTENT_ALL) == CC_CONTENT_ALL .
534 .It Dv CC_CONTENT_NONE ("none")
535 This value indicates that there is no content present.
536 .It Dv CC_CONTENT_DEFAULT ("default")
537 The content includes the following set of default values:
538 .Dv CC_CONTENT_STACK ,
539 .Dv CC_CONTENT_HEAP ,
541 .Dv CC_CONTENT_DISM ,
543 .Dv CC_CONTENT_SHANON ,
544 .Dv CC_CONTENT_TEXT ,
545 .Dv CC_CONTENT_DATA ,
546 .Dv CC_CONTENT_RODATA ,
547 .Dv CC_CONTENT_ANON ,
550 .Dv CC_CONTENT_SYMTAB.
551 Note that the default may change.
552 Comparisons with CC_CONTENT_DEFAULT should validate that all of the expected
553 bits are set with an expression such as
554 .Li (c\ &\ CC_CONTENT_DEFAULT)\ ==\ CC_CONTENT_DEFAULT.
555 .It Dv CC_CONTENT_INVALID
556 This indicates that the contents are invalid.
563 structure is used with the
565 function which describes information about a file descriptor.
566 The structure is defined as follows:
568 typedef struct prfdinfo {
573 major_t pr_major; /* think stat.st_dev */
575 major_t pr_rmajor; /* think stat.st_rdev */
580 int pr_fileflags; /* fcntl(F_GETXFL), etc */
581 int pr_fdflags; /* fcntl(F_GETFD), etc. */
582 char pr_path[MAXPATHLEN];
586 The structure has similar information to that found in the
588 structure that's used as part of the stat family of system calls,
593 contains the number of the file descriptor of the file.
601 are the same as the members
616 members contain the major and minor numbers of the device containing the
617 directory for this file.
618 This is similar to the
622 structure, except that it is broken out into its major and minor components.
627 members are similar in spirit to
631 however, they are equivalent to the
635 structure and thus have meaning for special character and block files.
639 member contains the current seek offset of the file descriptor.
644 members contain the flags that would have been returned by a call to
656 structure is used with the various symbol look up functions
657 .Fn Pxlookup_by_name ,
658 .Fn Pxlookup_by_addr ,
660 .Fn Pxlookup_by_addr_resolved
661 which describes additional information about a symbol.
662 The structure is defined as follows:
664 typedef struct prsyminfo {
665 const char *prs_object; /* object name */
666 const char *prs_name; /* symbol name */
667 Lmid_t prs_lmid; /* link map id */
668 uint_t prs_id; /* symbol id */
669 uint_t prs_table; /* symbol table id */
675 points to a string that contains the name of the object file, if known,
676 that the symbol comes from.
679 points to the name of the symbol, if known.
680 This may be unknown due to a stripped binary that contains no symbol table.
683 indicates the link map identifier that the symbol was found on.
684 For more information on link map identifiers refer to the
685 .Em Linker and Libraries Guide
693 can be used to determine both the symbol table that the entry came from
694 and which entry in the table it corresponds to.
699 then it came from the ELF standard symbol table.
700 However, if it is instead
702 then that indicates that it comes from the process's dynamic section.
708 is a function pointer type that is used with the
716 .Fa "const lwpstatus_t *"
718 The first argument is a pointer to an argument that the user specifies,
719 while the second has the thread's status information and is defined in
721 For additional information on using this type, see
722 .Xr Plwp_iter 3PROC .
728 is a function pointer type that is used with the
736 .Fa "const lwpstatus_t *"
737 .Fa "const lwpsinfo_t *"
739 The first argument is a pointer to an argument that the user specifies.
740 The second and third arguments contain the thread's status and
743 information respectively.
744 Both structures are defined in
746 For additional information on using this type, see
747 .Xr Plwp_iter_all 3PROC .
753 is a function pointer type that is used with the
764 The first argument contains the process
766 information and the second argument contains the representative thread's
769 Both structures are defined in
771 The final argument is a pointer to an argument that the user specifies.
772 For more information on using this, see
773 .Xr proc_walk 3PROC .
779 is a function pointer type that is used with the
781 .Fn Pmapping_iter_resolved ,
784 .Fn Pobject_iter_resolved
791 .Fa "const prmap_t *"
794 The first argument is a pointer to an argument that the user specifies.
795 The second argument is describes the mapping information and is defined
798 The final argument contains the name of the mapping or object file in
800 For additional information on using this type, see
801 .Xr Pmapping_iter 3PROC .
807 is a function pointer type that is used with the
815 .Fa "struct ps_prochandle *"
819 The first argument is a pointer to an argument that the user specifies.
820 The second argument is a pointer to the
821 .Sy struct ps_prochandle
822 that the callback was passed to.
823 The third argument is the address of the environment variable in the process.
824 The fourth argument is the environment variable.
825 Values in the environment follow the convention of the form
827 For more information on environment variables see
831 For additional information on using this type, see
832 .Xr Penv_iter 3PROC .
838 is a function pointer type that is used with the
840 .Fn Psymbol_iter_by_addr ,
841 .Fn Psymbol_iter_by_name ,
843 .Fn Psymbol_iter_by_lmid
850 .Fa "const GElf_Sym *"
853 The first argument is a pointer to an argument that the user supplies.
854 The second argument is a pointer to the ELF symbol information in a
855 32-bit and 64-bit neutral form.
860 for more information on it.
861 The final argument points to a character string that has the name of the symbol.
862 For additional information on using this type, see
863 .Xr Psymbol_iter 3PROC ,
864 .Xr Psymbol_iter_by_addr 3PROC ,
865 .Xr Psymbol_iter_by_name 3PROC ,
867 .Xr Psymbol_iter_by_lmid 3PROC .
873 is a function pointer type that is used with the
881 .Fa "const GElf_Sym *"
883 .Fa "const prsyminfo_t *"
885 The first three arguments are identical to those of
887 The final argument contains additional information about the symbol
891 are defined earlier in this section.
892 For additional information on using this type, see
893 .Xr Pxsymbol_iter 3PROC .
899 is a function pointer type that is used with the
911 The first argument is a pointer to an argument that the user specifies.
912 The second argument's contents are platform specific.
913 The registers that contain stack information, usually the stack pointer and
914 frame pointer, will be filled in to point to an entry.
920 The third argument contains the number of arguments to the current stack
921 frame and the fourth argument contains an array of addresses that
922 correspond to the arguments to that stack function.
923 The value of the third argument dictates the number of entries in the fourth
925 For additional information on using this type, see
926 .Xr Pstack_iter 3PROC .
932 is a function pointer type that is used with the
942 The first argument is a pointer to an argument that the user specifies.
943 The second argument contains information about an open file descriptor.
946 are defined earlier in this section.
947 For additional information on using this type, see
948 .Xr Pfdinfo_iter 3PROC .
949 .Sh PROGRAMMING NOTES
950 When working with live processes, whether from the
954 family of functions, there are some additional considerations.
955 Importantly, if a process calls any of the
957 suite of functions, much of the state information that is obtained,
958 particularly that about mappings in the process will be invalid.
959 Callers must ensure that they call
960 .Xr Preset_maps 3PROC
961 when they hold a process handle across an exec.
962 In addition, users of the library should familiarize themselves with the
963 .Sy PROGRAMMING NOTES
966 manual page, which discusses issues of privileges and security.
968 The library provides a means for obtaining additional debugging
970 The output itself is not part of the
972 library's stable interface.
973 Setting the environment variable
975 to some value will print information to standard error.
977 .Ev LIBPROC_DEUBG Ns = Ns Em please .
979 Most functions operate on a handle to a process in the form of a
980 .Vt "struct ps_prochandle *" .
981 Unless otherwise indicated, the library does not provide any
982 synchronization for different routines that are operating on the
986 It is up to the caller to ensure that only a single thread is using a handle at
988 Multiple threads may call
990 library routines at the same time as long as each thread is using a
993 Each individual function notes its
996 The MT-Level of a routine that matches the above description will refer to this
998 If it does not, then it refers to the standard attributes in
1000 .Sh INTERFACE STABILITY
1003 While the library is considered an uncommitted interface, and is still
1004 evolving, changes that break compatibility have been uncommon and this
1005 trend is expected to continue.
1006 It is documented to allow consumers, whether part of illumos or outside of it,
1007 to understand the libarary and make use of it with the understanding that
1008 changes may occur which break both source and binary compatibility.
1028 .%T Linkers and Libraries Guide
1033 .Xr Lgrab_error 3PROC ,
1035 .Xr Pcreate_agent 3PROC ,
1036 .Xr Pcreate_callback 3PROC ,
1037 .Xr Pcreate_error 3PROC ,
1038 .Xr Pdestroy_agent 3PROC ,
1039 .Xr Pfgrab_core 3PROC ,
1042 .Xr Pgrab_core 3PROC ,
1043 .Xr Pgrab_error 3PROC ,
1044 .Xr Pgrab_file 3PROC ,
1045 .Xr Pgrab_ops 3PROC ,
1046 .Xr Prelease 3PROC ,
1050 .Xr Paddr_to_ctf 3PROC ,
1051 .Xr Paddr_to_loadobj 3PROC ,
1052 .Xr Paddr_to_map 3PROC ,
1053 .Xr Paddr_to_text_map 3PROC ,
1055 .Xr Pclearfault 3PROC ,
1056 .Xr Pclearsig 3PROC ,
1057 .Xr Pcontent 3PROC ,
1060 .Xr Pdelbkpt 3PROC ,
1061 .Xr Pdelwapt 3PROC ,
1063 .Xr Pexecname 3PROC ,
1067 .Xr Pgetareg 3PROC ,
1068 .Xr Pgetauxval 3PROC ,
1069 .Xr Pgetauxvec 3PROC ,
1071 .Xr Pisprocdir 3PROC ,
1072 .Xr Pissyscall_prev 3PROC ,
1074 .Xr Plmid_to_loadobj 3PROC ,
1075 .Xr Plmid_to_map 3PROC ,
1076 .Xr Plookup_by_addr 3PROC ,
1077 .Xr Plookup_by_name 3PROC ,
1078 .Xr Plwp_alt_stack 3PROC ,
1079 .Xr Plwp_getfpregs 3PROC ,
1080 .Xr Plwp_getpsinfo 3PROC ,
1081 .Xr Plwp_getregs 3PROC ,
1082 .Xr Plwp_getspymaster 3PROC ,
1083 .Xr Plwp_main_stack 3PROC ,
1084 .Xr Plwp_setfpregs 3PROC ,
1085 .Xr Plwp_setregs 3PROC ,
1086 .Xr Plwp_stack 3PROC ,
1087 .Xr Pname_to_ctf 3PROC ,
1088 .Xr Pname_to_loadobj 3PROC ,
1089 .Xr Pname_to_map 3PROC ,
1090 .Xr Pobjname 3PROC ,
1091 .Xr Pobjname_resolved 3PROC ,
1092 .Xr Pplatform 3PROC ,
1093 .Xr Ppltdest 3PROC ,
1096 .Xr Pputareg 3PROC ,
1097 .Xr Prd_agent 3PROC ,
1099 .Xr Pread_string 3PROC ,
1100 .Xr Preset_maps 3PROC ,
1101 .Xr Psecflags 3PROC ,
1102 .Xr Psetbkpt 3PROC ,
1103 .Xr Psetcred 3PROC ,
1104 .Xr Psetfault 3PROC ,
1105 .Xr Psetflags 3PROC ,
1106 .Xr Psetpriv 3PROC ,
1108 .Xr Psetsignal 3PROC ,
1109 .Xr Psetsysentry 3PROC ,
1110 .Xr Psetsysexit 3PROC ,
1111 .Xr Psetwapt 3PROC ,
1112 .Xr Psetzoneid 3PROC ,
1117 .Xr Pstopstatus 3PROC ,
1119 .Xr Psysentry 3PROC ,
1120 .Xr Psysexit 3PROC ,
1122 .Xr Punsetflags 3PROC ,
1123 .Xr Pupdate_maps 3PROC ,
1124 .Xr Pupdate_syms 3PROC ,
1127 .Xr Pxecbkpt 3PROC ,
1128 .Xr Pxecwapt 3PROC ,
1129 .Xr Pxlookup_by_addr 3PROC ,
1130 .Xr Pxlookup_by_addr_resolved 3PROC ,
1131 .Xr Pxlookup_by_name 3PROC ,
1132 .Xr Pzonename 3PROC ,
1133 .Xr Pzonepath 3PROC ,
1136 .Xr Lalt_stack 3PROC ,
1137 .Xr Lclearfault 3PROC ,
1138 .Xr Lclearsig 3PROC ,
1141 .Xr Lgetareg 3PROC ,
1142 .Xr Lmain_stack 3PROC ,
1143 .Xr Lprochandle 3PROC ,
1145 .Xr Lputareg 3PROC ,
1153 .Xr Lxecbkpt 3PROC ,
1156 .Xr pr_access 3PROC ,
1157 .Xr pr_close 3PROC ,
1158 .Xr pr_creat 3PROC ,
1159 .Xr pr_door_info 3PROC ,
1161 .Xr pr_fcntl 3PROC ,
1162 .Xr pr_fstat 3PROC ,
1163 .Xr pr_fstat64 3PROC ,
1164 .Xr pr_fstatvfs 3PROC ,
1165 .Xr pr_getitimer 3PROC ,
1166 .Xr pr_getpeername 3PROC ,
1167 .Xr pr_getpeerucred 3PROC ,
1168 .Xr pr_getprojid 3PROC ,
1169 .Xr pr_getrctl 3PROC ,
1170 .Xr pr_getrlimit 3PROC ,
1171 .Xr pr_getrlimit64 3PROC ,
1172 .Xr pr_getsockname 3PROC ,
1173 .Xr pr_getsockopt 3PROC ,
1174 .Xr pr_gettaskid 3PROC ,
1175 .Xr pr_getzoneid 3PROC ,
1176 .Xr pr_ioctl 3PROC ,
1178 .Xr pr_llseek 3PROC ,
1179 .Xr pr_lseek 3PROC ,
1180 .Xr pr_lstat 3PROC ,
1181 .Xr pr_lstat64 3PROC ,
1182 .Xr pr_memcntl 3PROC ,
1183 .Xr pr_meminfo 3PROC ,
1185 .Xr pr_munmap 3PROC ,
1187 .Xr pr_processor_bind 3PROC ,
1188 .Xr pr_rename 3PROC ,
1189 .Xr pr_setitimer 3PROC ,
1190 .Xr pr_setrctl 3PROC ,
1191 .Xr pr_setrlimit 3PROC ,
1192 .Xr pr_setrlimit64 3PROC ,
1193 .Xr pr_settaskid 3PROC ,
1194 .Xr pr_sigaction 3PROC ,
1196 .Xr pr_stat64 3PROC ,
1197 .Xr pr_statvfs 3PROC ,
1198 .Xr pr_unlink 3PROC ,
1199 .Xr pr_waitid 3PROC ,
1201 .Xr Penv_iter 3PROC ,
1202 .Xr Plwp_iter 3PROC ,
1203 .Xr Plwp_iter_all 3PROC ,
1204 .Xr Pmapping_iter 3PROC ,
1205 .Xr Pmapping_iter_resolved 3PROC ,
1206 .Xr Pobject_iter 3PROC ,
1207 .Xr Pobject_iter_resolved 3PROC ,
1208 .Xr Pstack_iter 3PROC ,
1209 .Xr Psymbol_iter 3PROC ,
1210 .Xr Psymbol_iter_by_addr 3PROC ,
1211 .Xr Psymbol_iter_by_lmid 3PROC ,
1212 .Xr Psymbol_iter_by_name 3PROC ,
1213 .Xr Pxsymbol_iter 3PROC ,
1214 .Xr Pfdinfo_iter 3PROC
1216 .Xr Perror_printf 3PROC ,
1217 .Xr proc_arg_grab 3PROC ,
1218 .Xr proc_arg_psinfo 3PROC ,
1219 .Xr proc_arg_xgrab 3PROC ,
1220 .Xr proc_arg_xpsinfo 3PROC ,
1221 .Xr proc_content2str 3PROC ,
1222 .Xr proc_finistdio 3PROC ,
1223 .Xr proc_fltname 3PROC ,
1224 .Xr proc_fltset2str 3PROC ,
1225 .Xr proc_flushstdio 3PROC ,
1226 .Xr proc_get_auxv 3PROC ,
1227 .Xr proc_get_cred 3PROC ,
1228 .Xr proc_get_priv 3PROC ,
1229 .Xr proc_get_psinfo 3PROC ,
1230 .Xr proc_get_status 3PROC ,
1231 .Xr proc_initstdio 3PROC ,
1232 .Xr proc_lwp_in_set 3PROC ,
1233 .Xr proc_lwp_range_valid 3PROC ,
1234 .Xr proc_signame 3PROC ,
1235 .Xr proc_sigset2str 3PROC ,
1236 .Xr proc_str2content 3PROC ,
1237 .Xr proc_str2flt 3PROC ,
1238 .Xr proc_str2fltset 3PROC ,
1239 .Xr proc_str2sig 3PROC ,
1240 .Xr proc_str2sigset 3PROC ,
1241 .Xr proc_str2sys 3PROC ,
1242 .Xr proc_str2sysset 3PROC ,
1243 .Xr proc_sysname 3PROC ,
1244 .Xr proc_sysset2str 3PROC ,
1245 .Xr proc_unctrl_psinfo 3PROC ,
1249 .Xr proc_get_ldt 3PROC ,
1251 .Xr Plwp_getgwindows 3PROC ,
1252 .Xr Plwp_getxregs 3PROC ,
1253 .Xr Plwp_setxregs 3PROC ,
1255 .Xr Plwp_getasrs 3PROC ,
1256 .Xr Plwp_setasrs 3PROC