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