1 '\" te
   2 .\"  Copyright (c) 1998 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 PS_LGETREGS 3PROC "September 12, 2020"
   7 .SH NAME
   8 ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize,
   9 ps_lgetxregs, ps_lsetxregs \- routines that access the target process register
  10 in libthread_db
  11 .SH SYNOPSIS
  12 .nf
  13 #include <proc_service.h>
  14 
  15 \fBps_err_e\fR \fBps_lgetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  16      \fBprgregset_t\fR \fIgregset\fR);
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fBps_err_e\fR \fBps_lsetregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  22      \fBstatic prgregset_t\fR \fIgregset\fR);
  23 .fi
  24 
  25 .LP
  26 .nf
  27 \fBps_err_e\fR \fBps_lgetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  28      \fBprfpregset_t *\fR\fIfpregs\fR);
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBps_err_e\fR \fBps_lsetfpregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  34      \fBstatic prfpregset_t *\fR\fIfpregs\fR);
  35 .fi
  36 
  37 .LP
  38 .nf
  39 \fBps_err_e\fR \fBps_lgetxregsize\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  40      \fBint *\fR\fIxregsize\fR);
  41 .fi
  42 
  43 .LP
  44 .nf
  45 \fBps_err_e\fR \fBps_lgetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  46      \fBcaddr_t\fR \fIxregset\fR);
  47 .fi
  48 
  49 .LP
  50 .nf
  51 \fBps_err_e\fR \fBps_lsetxregs\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBlwpid_t\fR \fIlid\fR,
  52      \fBcaddr_t\fR \fIxregset\fR);
  53 .fi
  54 
  55 .SH DESCRIPTION
  56 \fBps_lgetregs()\fR, \fBps_lsetregs()\fR, \fBps_lgetfpregs()\fR,
  57 \fBps_lsetfpregs()\fR, \fBps_lgetxregsize()\fR, \fBps_lgetxregs()\fR,
  58 \fBps_lsetxregs()\fR read and write register sets from lightweight processes
  59 (\fBLWP\fRs) within the target process identified by \fIph\fR.
  60 \fBps_lgetregs()\fR gets the general registers of the \fBLWP\fR identified by
  61 \fIlid\fR, and \fBps_lsetregs()\fR sets them. \fBps_lgetfpregs()\fR gets the
  62 \fBLWP\fR's floating point register set, while \fBps_lsetfpregs()\fR sets it.
  63 .SS "SPARC Only"
  64 \fBps_lgetxregsize()\fR, \fBps_lgetxregs()\fR, and \fBps_lsetxregs()\fR are
  65 SPARC-specific. They do not need to be defined by a controlling process on
  66 non-SPARC architecture. \fBps_lgetxregsize()\fR returns in
  67 \fB*\fR\fIxregsize\fR the size of the architecture-dependent extra state
  68 registers. \fBps_lgetxregs()\fR gets the extra state registers, and
  69 \fBps_lsetxregs()\fR sets them.
  70 .SH RETURN VALUES
  71 .ne 2
  72 .na
  73 \fB\fBPS_OK\fR \fR
  74 .ad
  75 .RS 16n
  76 The call returned successfully.
  77 .RE
  78 
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fBPS_NOFPREGS\fR \fR
  83 .ad
  84 .RS 16n
  85 Floating point registers are neither available for this architecture nor for
  86 this process.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fB\fBPS_NOXREGS\fR \fR
  93 .ad
  94 .RS 16n
  95 Extra state registers are not available on this architecture.
  96 .RE
  97 
  98 .sp
  99 .ne 2
 100 .na
 101 \fB\fBPS_ERR\fR \fR
 102 .ad
 103 .RS 16n
 104 The function did not return successfully.
 105 .RE
 106 
 107 .SH ATTRIBUTES
 108 See \fBattributes\fR(7) for description of the following attributes:
 109 .sp
 110 
 111 .sp
 112 .TS
 113 box;
 114 c | c
 115 l | l .
 116 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 117 _
 118 MT Level        Safe
 119 .TE
 120 
 121 .SH SEE ALSO
 122 .BR libc_db (3LIB),
 123 .BR proc_service (3PROC),
 124 .BR attributes (7),
 125 .BR threads (7)