4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _MDB_KREG_H
27 #define _MDB_KREG_H
28
29 #pragma ident "%Z%%M% %I% %E% SMI"
30
31 #include <sys/kdi_regs.h>
32 #ifndef _ASM
33 #include <sys/types.h>
34 #endif
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #ifndef _ASM
41 #ifdef __amd64
42 typedef uint64_t kreg_t;
43 #else /* __amd64 */
44 typedef uint32_t kreg_t;
45 #endif /* __amd64 */
46 #endif /* !_ASM */
47
48 #define KREG_NGREG KDIREG_NGREG
49
50 /*
58 #define KREG_SAVPC KDIREG_SAVPC
59 #define KREG_RDI KDIREG_RDI
60 #define KREG_RSI KDIREG_RSI
61 #define KREG_RDX KDIREG_RDX
62 #define KREG_RCX KDIREG_RCX
63 #define KREG_R8 KDIREG_R8
64 #define KREG_R9 KDIREG_R9
65 #define KREG_RAX KDIREG_RAX
66 #define KREG_RBX KDIREG_RBX
67 #define KREG_RBP KDIREG_RBP
68 #define KREG_R10 KDIREG_R10
69 #define KREG_R11 KDIREG_R11
70 #define KREG_R12 KDIREG_R12
71 #define KREG_R13 KDIREG_R13
72 #define KREG_R14 KDIREG_R14
73 #define KREG_R15 KDIREG_R15
74 #define KREG_DS KDIREG_DS
75 #define KREG_ES KDIREG_ES
76 #define KREG_FS KDIREG_FS
77 #define KREG_GS KDIREG_GS
78 #define KREG_TRAPNO KDIREG_TRAPNO
79 #define KREG_ERR KDIREG_ERR
80 #define KREG_RIP KDIREG_RIP
81 #define KREG_CS KDIREG_CS
82 #define KREG_RFLAGS KDIREG_RFLAGS
83 #define KREG_RSP KDIREG_RSP
84 #define KREG_SS KDIREG_SS
85
86 #define KREG_PC KREG_RIP
87 #define KREG_SP KREG_RSP
88 #define KREG_FP KREG_RBP
89
90 #else /* __amd64 */
91
92 #define KREG_SAVFP KDIREG_SAVFP
93 #define KREG_SAVPC KDIREG_SAVPC
94 #define KREG_SS KDIREG_SS
95 #define KREG_GS KDIREG_GS
96 #define KREG_FS KDIREG_FS
97 #define KREG_ES KDIREG_ES
98 #define KREG_DS KDIREG_DS
99 #define KREG_EDI KDIREG_EDI
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 *
25 * Copyright 2018 Joyent, Inc.
26 */
27
28 #ifndef _MDB_KREG_H
29 #define _MDB_KREG_H
30
31 #include <sys/kdi_regs.h>
32 #ifndef _ASM
33 #include <sys/types.h>
34 #endif
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #ifndef _ASM
41 #ifdef __amd64
42 typedef uint64_t kreg_t;
43 #else /* __amd64 */
44 typedef uint32_t kreg_t;
45 #endif /* __amd64 */
46 #endif /* !_ASM */
47
48 #define KREG_NGREG KDIREG_NGREG
49
50 /*
58 #define KREG_SAVPC KDIREG_SAVPC
59 #define KREG_RDI KDIREG_RDI
60 #define KREG_RSI KDIREG_RSI
61 #define KREG_RDX KDIREG_RDX
62 #define KREG_RCX KDIREG_RCX
63 #define KREG_R8 KDIREG_R8
64 #define KREG_R9 KDIREG_R9
65 #define KREG_RAX KDIREG_RAX
66 #define KREG_RBX KDIREG_RBX
67 #define KREG_RBP KDIREG_RBP
68 #define KREG_R10 KDIREG_R10
69 #define KREG_R11 KDIREG_R11
70 #define KREG_R12 KDIREG_R12
71 #define KREG_R13 KDIREG_R13
72 #define KREG_R14 KDIREG_R14
73 #define KREG_R15 KDIREG_R15
74 #define KREG_DS KDIREG_DS
75 #define KREG_ES KDIREG_ES
76 #define KREG_FS KDIREG_FS
77 #define KREG_GS KDIREG_GS
78 #define KREG_GSBASE KDIREG_GSBASE
79 #define KREG_KGSBASE KDIREG_KGSBASE
80 #define KREG_TRAPNO KDIREG_TRAPNO
81 #define KREG_ERR KDIREG_ERR
82 #define KREG_CR2 KDIREG_CR2
83 #define KREG_CR3 KDIREG_CR3
84 #define KREG_RIP KDIREG_RIP
85 #define KREG_CS KDIREG_CS
86 #define KREG_RFLAGS KDIREG_RFLAGS
87 #define KREG_RSP KDIREG_RSP
88 #define KREG_SS KDIREG_SS
89
90 #define KREG_PC KREG_RIP
91 #define KREG_SP KREG_RSP
92 #define KREG_FP KREG_RBP
93
94 #else /* __amd64 */
95
96 #define KREG_SAVFP KDIREG_SAVFP
97 #define KREG_SAVPC KDIREG_SAVPC
98 #define KREG_SS KDIREG_SS
99 #define KREG_GS KDIREG_GS
100 #define KREG_FS KDIREG_FS
101 #define KREG_ES KDIREG_ES
102 #define KREG_DS KDIREG_DS
103 #define KREG_EDI KDIREG_EDI
|