Print this page
9210 remove KMDB branch debugging support
9211 ::crregs could do with cr2/cr3 support
9209 ::ttrace should be able to filter by thread
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mdb/common/kmdb/kmdb_dpi_impl.h
+++ new/usr/src/cmd/mdb/common/kmdb/kmdb_dpi_impl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 + *
25 + * Copyright 2018 Joyent, Inc.
24 26 */
25 27
26 28 #ifndef _KMDB_DPI_IMPL_H
27 29 #define _KMDB_DPI_IMPL_H
28 30
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 31 #include <setjmp.h>
32 32 #ifdef __sparc
33 33 #include <sys/regset.h>
34 34 #endif /* __sparc */
35 35 #include <sys/types.h>
36 36
37 37 #include <kmdb/kmdb_auxv.h>
38 38 #include <kmdb/kmdb_dpi.h>
39 39 #include <mdb/mdb_kreg.h>
40 40 #include <mdb/mdb_target.h>
41 41
42 42 #ifdef __cplusplus
43 43 extern "C" {
44 44 #endif
45 45
46 46 extern jmp_buf *kmdb_dpi_fault_pcb;
47 47
48 48 /*
49 49 * The routines used by the kmdb side of the DPI to access the saved state
50 50 * of the current kernel instance, and to control that instance. A populated
51 51 * version of this vector is provided by the DPI backend used to control the
52 52 * machine. General use of the kmdb DPI is not via direct invocation of the
53 53 * functions in this ops vector, but rather flows through the convenience
54 54 * wrappers in kmdb_dpi.c.
55 55 */
56 56 struct dpi_ops {
57 57 int (*dpo_init)(kmdb_auxv_t *);
58 58
59 59 void (*dpo_debugger_activate)(kdi_debugvec_t **, uint_t);
60 60 void (*dpo_debugger_deactivate)(void);
61 61
62 62 void (*dpo_enter_mon)(void);
63 63
64 64 void (*dpo_modchg_register)(void (*)(struct modctl *, int));
65 65 void (*dpo_modchg_cancel)(void);
66 66
67 67 int (*dpo_get_cpu_state)(int);
68 68 int (*dpo_get_master_cpuid)(void);
69 69
70 70 const mdb_tgt_gregset_t *(*dpo_get_gregs)(int);
71 71 int (*dpo_get_register)(const char *, kreg_t *);
72 72 int (*dpo_set_register)(const char *, kreg_t);
73 73 #ifdef __sparc
74 74 int (*dpo_get_rwin)(int, int, struct rwindow *);
75 75 int (*dpo_get_nwin)(int);
76 76 #endif
77 77
78 78 int (*dpo_brkpt_arm)(uintptr_t, mdb_instr_t *);
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
79 79 int (*dpo_brkpt_disarm)(uintptr_t, mdb_instr_t);
80 80
81 81 int (*dpo_wapt_validate)(kmdb_wapt_t *);
82 82 int (*dpo_wapt_reserve)(kmdb_wapt_t *);
83 83 void (*dpo_wapt_release)(kmdb_wapt_t *);
84 84 void (*dpo_wapt_arm)(kmdb_wapt_t *);
85 85 void (*dpo_wapt_disarm)(kmdb_wapt_t *);
86 86 int (*dpo_wapt_match)(kmdb_wapt_t *);
87 87
88 88 int (*dpo_step)(void);
89 -#if defined(__i386) || defined(__amd64)
90 - void (*dpo_step_branch)(void);
91 -#endif
92 89
93 90 uintptr_t (*dpo_call)(uintptr_t, uint_t, const uintptr_t *);
94 91
95 92 void (*dpo_dump_crumbs)(uintptr_t, int);
96 93
97 -#if defined(__i386) || defined(__amd64)
98 - void (*dpo_msr_add)(const kdi_msr_t *);
99 - uint64_t (*dpo_msr_get)(int, uint_t);
100 -#endif
101 -
102 94 #ifdef __sparc
103 95 void (*dpo_kernpanic)(int);
104 96 #endif
105 97 };
106 98
107 99 extern void (*kmdb_dpi_wrintr_fire)(void);
108 100
109 101 extern dpi_ops_t kmdb_dpi_ops;
110 102
111 103 extern void kmdb_dpi_resume_common(int);
112 104 extern void kmdb_dpi_resume_master(void);
113 105
114 106 /* Used by the debugger to tell the driver how to resume */
115 107 #define KMDB_DPI_CMD_RESUME_ALL 1 /* Resume all CPUs */
116 108 #define KMDB_DPI_CMD_RESUME_MASTER 2 /* Resume only master CPU */
117 109 #define KMDB_DPI_CMD_RESUME_UNLOAD 3 /* Resume for debugger unload */
118 110 #define KMDB_DPI_CMD_SWITCH_CPU 4 /* Switch to another CPU */
119 111 #define KMDB_DPI_CMD_FLUSH_CACHES 5 /* Flush slave caches */
120 112 #define KMDB_DPI_CMD_REBOOT 6 /* Reboot the machine */
121 113
122 114 #ifdef __cplusplus
123 115 }
124 116 #endif
125 117
126 118 #endif /* _KMDB_DPI_IMPL_H */
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX