Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
    usr/src/uts/common/fs/proc/prcontrol.c
    usr/src/uts/intel/os/archdep.c
    usr/src/uts/intel/sys/ucontext.h
    usr/src/uts/intel/syscall/getcontext.c
   1 '\" te
   2 .\" Copyright (c) 2007 by Sun Microsystems, Inc. All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH PROC_SERVICE 3PROC "Oct 12, 2007"
   7 .SH NAME
   8 proc_service \- process service interfaces
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <proc_service.h>
  13 
  14 \fBps_err_e\fR \fBps_pdmodel\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  15      \fBint *\fR\fIdata_model\fR);
  16 .fi
  17 
  18 .LP
  19 .nf
  20 \fBps_err_e\fR \fBps_pglobal_lookup\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  21      \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
  22      \fBpsaddr_t *\fR\fIsym_addr\fR);
  23 .fi
  24 
  25 .LP
  26 .nf
  27 \fBps_err_e\fR \fBps_pglobal_sym\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  28      \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
  29      \fBps_sym_t *\fR\fIsym\fR);
  30 .fi


 114 \fBps_err_e\fR \fBps_pauxv\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 115      \fBconst auxv_t **\fR\fIauxp\fR);
 116 .fi
 117 
 118 .LP
 119 .nf
 120 \fBps_err_e\fR \fBps_kill\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBint\fR \fIsig\fR);
 121 .fi
 122 
 123 .LP
 124 .nf
 125 \fBps_err_e\fR \fBps_lrolltoaddr\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 126      \fBlwpid_t\fR \fIlwpid\fR, \fBpsaddr_t\fR \fIgo_addr\fR, \fBpsaddr_t\fR \fIstop_addr\fR);
 127 .fi
 128 
 129 .LP
 130 .nf
 131 \fBvoid\fR \fBps_plog\fR(\fBconst char *\fR\fIfmt\fR);
 132 .fi
 133 
 134 .SS "SPARC"
 135 .LP
 136 .nf
 137 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 138      \fBlwpid_t\fR \fIlwpid\fR, \fBint *\fR\fIxregsize\fR);
 139 .fi
 140 
 141 .LP
 142 .nf
 143 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 144      \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
 145 .fi
 146 
 147 .LP
 148 .nf
 149 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 150      \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
 151 .fi
 152 
 153 .SS "x86"
 154 .LP
 155 .nf
 156 \fBps_err_e\fR \fBps_lgetLDT\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
 157      \fBstruct ssd *\fR\fIldt\fR);
 158 .fi
 159 
 160 .SH DESCRIPTION
 161 .LP
 162 Every program that links \fBlibthread_db\fR or \fBlibrtld_db\fR must provide a
 163 set of process control primitives that allow \fBlibthread_db\fR and
 164 \fBlibrtld_db\fR to access memory and registers in the target process, to start
 165 and to stop the target process, and to look up symbols in the target process.
 166 See \fBlibc_db\fR(3LIB). For information on \fBlibrtld_db\fR, refer to the
 167 \fILinker and Libraries Guide\fR.
 168 .sp
 169 .LP
 170 Refer to the individual reference manual pages that describe these routines for
 171 a functional specification that clients of \fBlibthread_db\fR and
 172 \fBlibrtld_db\fR can use to implement this required interface. The
 173 <\fBproc_service.h\fR> header lists the C declarations of these routines.
 174 .SH FUNCTIONS
 175 .ne 2
 176 .na
 177 \fB\fBps_pdmodel()\fR\fR
 178 .ad
 179 .RS 23n
 180 Returns the data model of the target process.
 181 .RE


 346 .RE
 347 
 348 .sp
 349 .ne 2
 350 .na
 351 \fB\fBps_lrolltoaddr()\fR\fR
 352 .ad
 353 .RS 23n
 354 Rolls the \fBLWP\fR out of a critical section when the process is stopped.
 355 .RE
 356 
 357 .sp
 358 .ne 2
 359 .na
 360 \fB\fBps_plog()\fR\fR
 361 .ad
 362 .RS 23n
 363 Logs a message.
 364 .RE
 365 
 366 .SS "SPARC"
 367 .ne 2
 368 .na
 369 \fB\fBps_lgetxregsize()\fR\fR
 370 .ad
 371 .RS 21n
 372 Returns the size of the architecture-dependent extra state registers.
 373 .RE
 374 
 375 .sp
 376 .ne 2
 377 .na
 378 \fB\fBps_lgetxregs()\fR\fR
 379 .ad
 380 .RS 21n
 381 Gets the extra state registers of the \fBLWP\fR.
 382 .RE
 383 
 384 .sp
 385 .ne 2
 386 .na
 387 \fB\fBps_lsetxregs()\fR\fR
 388 .ad
 389 .RS 21n
 390 Sets the extra state registers of the \fBLWP\fR.
 391 .RE
 392 
 393 .SS "x86"
 394 .ne 2
 395 .na
 396 \fB\fBps_lgetLDT()\fR\fR
 397 .ad
 398 .RS 16n
 399 Reads the local descriptor table of the \fBLWP\fR.
 400 .RE
 401 
 402 .SH ATTRIBUTES
 403 .LP
 404 See \fBattributes\fR(7) for description of the following attributes:
 405 .sp
 406 
 407 .sp
 408 .TS
 409 box;
 410 c | c
 411 l | l .
 412 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 413 _
 414 MT Level        Safe
 415 .TE
 416 
 417 .SH SEE ALSO
 418 .LP
 419 .BR rtld_db (3EXT),
 420 .BR libc_db (3LIB),
 421 .BR librtld_db (3LIB),
 422 .BR ps_pread (3PROC),
 423 .BR attributes (7)
 424 .sp
 425 .LP
 426 \fILinker and Libraries Guide\fR
   1 '\" te
   2 .\" Copyright (c) 2007 by Sun Microsystems, Inc. All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH PROC_SERVICE 3PROC "Jan 23, 2023"
   7 .SH NAME
   8 proc_service \- process service interfaces
   9 .SH SYNOPSIS

  10 .nf
  11 #include <proc_service.h>
  12 
  13 \fBps_err_e\fR \fBps_pdmodel\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  14      \fBint *\fR\fIdata_model\fR);
  15 .fi
  16 
  17 .LP
  18 .nf
  19 \fBps_err_e\fR \fBps_pglobal_lookup\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  20      \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
  21      \fBpsaddr_t *\fR\fIsym_addr\fR);
  22 .fi
  23 
  24 .LP
  25 .nf
  26 \fBps_err_e\fR \fBps_pglobal_sym\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
  27      \fBconst char *\fR\fIobject_name\fR, \fBconst char *\fR\fIsym_name\fR,
  28      \fBps_sym_t *\fR\fIsym\fR);
  29 .fi


 113 \fBps_err_e\fR \fBps_pauxv\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 114      \fBconst auxv_t **\fR\fIauxp\fR);
 115 .fi
 116 
 117 .LP
 118 .nf
 119 \fBps_err_e\fR \fBps_kill\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBint\fR \fIsig\fR);
 120 .fi
 121 
 122 .LP
 123 .nf
 124 \fBps_err_e\fR \fBps_lrolltoaddr\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 125      \fBlwpid_t\fR \fIlwpid\fR, \fBpsaddr_t\fR \fIgo_addr\fR, \fBpsaddr_t\fR \fIstop_addr\fR);
 126 .fi
 127 
 128 .LP
 129 .nf
 130 \fBvoid\fR \fBps_plog\fR(\fBconst char *\fR\fIfmt\fR);
 131 .fi
 132 

 133 .LP
 134 .nf
 135 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 136      \fBlwpid_t\fR \fIlwpid\fR, \fBint *\fR\fIxregsize\fR);
 137 .fi
 138 
 139 .LP
 140 .nf
 141 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 142      \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
 143 .fi
 144 
 145 .LP
 146 .nf
 147 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR,
 148      \fBlwpid_t\fR \fIlwpid\fR, \fBcaddr_t\fR \fIxregset\fR);
 149 .fi
 150 
 151 .SS "x86"

 152 .nf
 153 \fBps_err_e\fR \fBps_lgetLDT\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlwpid\fR,
 154      \fBstruct ssd *\fR\fIldt\fR);
 155 .fi
 156 
 157 .SH DESCRIPTION

 158 Every program that links \fBlibthread_db\fR or \fBlibrtld_db\fR must provide a
 159 set of process control primitives that allow \fBlibthread_db\fR and
 160 \fBlibrtld_db\fR to access memory and registers in the target process, to start
 161 and to stop the target process, and to look up symbols in the target process.
 162 See \fBlibc_db\fR(3LIB). For information on \fBlibrtld_db\fR, refer to the
 163 \fILinker and Libraries Guide\fR.
 164 .sp
 165 .LP
 166 Refer to the individual reference manual pages that describe these routines for
 167 a functional specification that clients of \fBlibthread_db\fR and
 168 \fBlibrtld_db\fR can use to implement this required interface. The
 169 <\fBproc_service.h\fR> header lists the C declarations of these routines.
 170 .SH FUNCTIONS
 171 .ne 2
 172 .na
 173 \fB\fBps_pdmodel()\fR\fR
 174 .ad
 175 .RS 23n
 176 Returns the data model of the target process.
 177 .RE


 342 .RE
 343 
 344 .sp
 345 .ne 2
 346 .na
 347 \fB\fBps_lrolltoaddr()\fR\fR
 348 .ad
 349 .RS 23n
 350 Rolls the \fBLWP\fR out of a critical section when the process is stopped.
 351 .RE
 352 
 353 .sp
 354 .ne 2
 355 .na
 356 \fB\fBps_plog()\fR\fR
 357 .ad
 358 .RS 23n
 359 Logs a message.
 360 .RE
 361 

 362 .ne 2
 363 .na
 364 \fB\fBps_lgetxregsize()\fR\fR
 365 .ad
 366 .RS 21n
 367 Returns the size of the architecture-dependent extra state registers.
 368 .RE
 369 
 370 .sp
 371 .ne 2
 372 .na
 373 \fB\fBps_lgetxregs()\fR\fR
 374 .ad
 375 .RS 21n
 376 Gets the extra state registers of the \fBLWP\fR.
 377 .RE
 378 
 379 .sp
 380 .ne 2
 381 .na
 382 \fB\fBps_lsetxregs()\fR\fR
 383 .ad
 384 .RS 21n
 385 Sets the extra state registers of the \fBLWP\fR.
 386 .RE
 387 
 388 .SS "x86"
 389 .ne 2
 390 .na
 391 \fB\fBps_lgetLDT()\fR\fR
 392 .ad
 393 .RS 16n
 394 Reads the local descriptor table of the \fBLWP\fR.
 395 .RE
 396 
 397 .SH ATTRIBUTES

 398 See \fBattributes\fR(7) for description of the following attributes:
 399 .sp
 400 
 401 .sp
 402 .TS
 403 box;
 404 c | c
 405 l | l .
 406 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 407 _
 408 MT Level        Safe
 409 .TE
 410 
 411 .SH SEE ALSO

 412 .BR rtld_db (3EXT),
 413 .BR libc_db (3LIB),
 414 .BR librtld_db (3LIB),
 415 .BR ps_pread (3PROC),
 416 .BR attributes (7)
 417 .sp
 418 .LP
 419 \fILinker and Libraries Guide\fR