xref: /titanic_41/usr/src/cmd/mdb/common/kmdb/kvm_cpu.h (revision a31148363f598def767ac48c5d82e1572e44b935)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _KVM_CPU_H
28 #define	_KVM_CPU_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * CPU-specific target implementation
34  *
35  * Each CPU provides a set of debugging facilities.  We have per-CPU "modules",
36  * each of which exposes a kmt_cpu_t.  When initialized, these modules will
37  * install dcmds, walkers, and the like in order to allow the user to take
38  * advantage of features specific to the CPU being used.
39  */
40 
41 #include <mdb/mdb_target.h>
42 
43 #include <sys/types.h>
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 typedef struct kmt_cpu kmt_cpu_t;
50 
51 extern kmt_cpu_t *kmt_cpu_create(mdb_tgt_t *);
52 extern void kmt_cpu_destroy(kmt_cpu_t *);
53 
54 extern const char *kmt_cpu_name(kmt_cpu_t *);
55 
56 #if defined(__i386) || defined(__amd64)
57 extern int kmt_cpu_step_branch(mdb_tgt_t *, kmt_cpu_t *);
58 #endif
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* _KVM_CPU_H */
65