Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man3c_db/td_thr_getgregs.3c_db
+++ new/usr/src/man/man3c_db/td_thr_getgregs.3c_db
1 1 .\"
2 2 .\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved
3 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 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 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 6 .\" Copyright 2023 Oxide Computer Company
7 7 .Dd January 23, 2023
8 8 .Dt TD_THR_GETGREGS 3C_DB
9 9 .Os
10 10 .Sh NAME
11 11 .Nm td_thr_getgregs ,
12 12 .Nm td_thr_setgregs ,
13 13 .Nm td_thr_getfpregs ,
14 14 .Nm td_thr_setfpregs ,
15 15 .Nm td_thr_getxregsize ,
16 16 .Nm td_thr_getxregs ,
17 17 .Nm td_thr_setxregs
18 18 .Nd reading and writing thread registers in libc_db
19 19 .Sh LIBRARY
20 20 .Lb libc_db
21 21 .Sh SYNOPSIS
22 22 .In proc_service.h
23 23 .In thread_db.h
24 24 .Ft td_err_e
25 25 .Fo td_thr_getgregs
26 26 .Fa "const td_thrhandle_t *th_p"
27 27 .Fa "prgregset_t gregset"
28 28 .Fc
29 29 .Ft td_err_e
30 30 .Fo td_thr_setgregs
31 31 .Fa "const td_thrhandle_t *th_p"
32 32 .Fa "prgregset_t gregset"
33 33 .Fc
34 34 .Ft td_err_e
35 35 .Fo td_thr_getfpregs
36 36 .Fa "const td_thrhandle_t *th_p"
37 37 .Fa "prfpregset_t *fpregset"
38 38 .Fc
39 39 .Ft td_err_e
40 40 .Fo td_thr_setfpregs
41 41 .Fa "const td_thrhandle_t *th_p"
42 42 .Fa "prfpregset_t *fpregset"
43 43 .Fc
44 44 .Ft td_err_e
45 45 .Fo td_thr_getxregsize
46 46 .Fa "const td_thrhandle_t *th_p"
47 47 .Fa "int *xregsize"
48 48 .Fc
49 49 .Ft td_err_e
50 50 .Fo td_thr_getxregs
51 51 .Fa "const td_thrhandle_t *th_p"
52 52 .Fa "prxregset_t *xregset"
53 53 .Fc
54 54 .Ft td_err_e
55 55 .Fo td_thr_setxregs
56 56 .Fa "const td_thrhandle_t *th_p"
57 57 .Fa "prxregset_t *xregset"
58 58 .Fc
59 59 .Sh DESCRIPTION
60 60 These functions read and write the register sets associated with thread
61 61 .Fa th_p .
62 62 The
63 63 .Fn td_thr_getgregs
64 64 and
65 65 .Fn td_thr_setgregs
66 66 functions get and set, respectively, the general registers of thread
67 67 .Fa th_p .
68 68 The
69 69 .Fn td_thr_getfpregs
70 70 and
71 71 .Fn td_thr_setfpregs
72 72 functions get and set, respectively, the thread's floating point register set.
73 73 .Pp
74 74 The
75 75 .Fn td_thr_getxregsize
76 76 function returns in
77 77 .Fa *xregsize
78 78 the size of the
79 79 architecture-dependent extra state registers.
80 80 The
81 81 .Fn td_thr_getxregs
82 82 and
83 83 .Fn td_thr_setxregs
84 84 functions get and set, respectively, those extra state registers.
85 85 The buffer passed to
86 86 .Fn td_thr_getxregs
87 87 must be at least the size indicated by
88 88 .Fn td_thr_getxregsize .
89 89 This size must not be assumed and may change between processes.
90 90 Failure to do so, will result in the system overwriting memory.
91 91 Not all platforms implement extended registers.
92 92 When they are not implemented, these functions return
93 93 .Dv TD_NOXREGS .
94 94 .Sh RETURN VALUES
95 95 The
96 96 .Fn td_thr_getgregs ,
97 97 .Fn td_thr_setgregs ,
98 98 .Fn td_thr_getfpregs ,
99 99 .Fn td_thr_setfpregs ,
100 100 .Fn td_thr_getxregsize ,
101 101 .Fn td_thr_getxregs ,
102 102 and
103 103 .Fn td_thr_setxregs
104 104 functions return one of the following values:
105 105 .Bl -tag -width Ds
106 106 .It Dv TD_OK
107 107 The call completed successfully.
108 108 .It Dv TD_BADTH
109 109 An invalid thread handle was passed in.
110 110 .It Dv TD_DBERR
111 111 A call to one of the imported interface routines failed.
112 112 .It Dv TD_NOFPREGS
113 113 Floating point registers could not be read or written because the architecture
114 114 does not have such registers.
115 115 .It Dv TD_NOXREGS
116 116 Architecture-dependent extra state registers could not be read or written,
117 117 because the architecture does not have such registers.
118 118 .It Dv TD_ERR
119 119 A
120 120 .Sy libc_db
121 121 internal error occurred.
122 122 .El
123 123 .Sh MT-LEVEL
124 124 .Sy Safe
125 125 .Sh SEE ALSO
126 126 .Xr libc_db 3LIB ,
127 127 .Xr attributes 7
|
↓ open down ↓ |
127 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX