Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
   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 2015 Joyent, Inc.
  13 .\"
  14 .Dd June 06, 2016
  15 .Dt LIBPROC 3LIB
  16 .Os
  17 .Sh NAME
  18 .Nm libproc
  19 .Nd process control library
  20 .Sh SYNOPSIS
  21 .Lb libproc
  22 .In libproc.h
  23 .Sh DESCRIPTION
  24 The
  25 .Nm
  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
  30 .Pf ( Xr proc 4 ) .
  31 .Pp
  32 The
  33 .Nm
  34 library provides interfaces that focus on:


 200 .El
 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
 247 .It Sy Pzoneroot Ta
 248 .El
 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 ""
 263 .El
 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"


   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 .\"
  14 .Dd August 31, 2018
  15 .Dt LIBPROC 3LIB
  16 .Os
  17 .Sh NAME
  18 .Nm libproc
  19 .Nd process control library
  20 .Sh SYNOPSIS
  21 .Lb libproc
  22 .In libproc.h
  23 .Sh DESCRIPTION
  24 The
  25 .Nm
  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
  30 .Pf ( Xr proc 4 ) .
  31 .Pp
  32 The
  33 .Nm
  34 library provides interfaces that focus on:


 200 .El
 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_getname Ta Sy Plwp_getpsinfo
 221 .It Sy Plwp_getregs Ta Sy Plwp_getspymaster
 222 .It Sy Plwp_main_stack Ta Sy Plwp_setfpregs
 223 .It Sy Plwp_setregs Ta Sy Plwp_stack
 224 .It Sy Pname_to_ctf Ta Sy Pname_to_loadobj
 225 .It Sy Pname_to_map Ta Sy Pobjname
 226 .It Sy Pobjname_resolved Ta Sy Pplatform
 227 .It Sy Ppltdest Ta Sy Ppriv
 228 .It Sy Ppsinfo Ta Sy Pputareg
 229 .It Sy Prd_agent Ta Sy Pread
 230 .It Sy Pread_string Ta Sy Preset_maps
 231 .It Sy Psetbkpt Ta Sy Psecflags
 232 .It Sy Psetcred Ta Sy Psetfault
 233 .It Sy Psetflags Ta Sy Psetpriv
 234 .It Sy Psetrun Ta Sy Psetsignal
 235 .It Sy Psetsysentry Ta Sy Psetsysexit
 236 .It Sy Psetwapt Ta Sy Psetzoneid
 237 .It Sy Psignal Ta Sy Pstate
 238 .It Sy Pstatus Ta Sy Pstop
 239 .It Sy Pstopstatus Ta Sy Psync
 240 .It Sy Psysentry Ta Sy Psysexit
 241 .It Sy Puname Ta Sy Punsetflags
 242 .It Sy Pupdate_maps Ta Sy Pupdate_syms
 243 .It Sy Pwait Ta Sy Pwrite
 244 .It Sy Pxecbkpt Ta Sy Pxecwapt
 245 .It Sy Pxlookup_by_addr Ta Sy Pxlookup_by_addr_resolved
 246 .It Sy Pxlookup_by_name Ta Sy Pzonename
 247 .It Sy Pzonepath Ta Sy Pzoneroot Ta
 248 .El
 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 ""
 263 .El
 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"