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.
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.
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]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * A KVM backend is used by the KVM target to interrogate the address space of
33 * the subject binary. This is almost always via direct calls into libkvm,
34 * except for hypervisor core dumps, which implement its own backend via the
35 * mdb_kb support module.
38 #include <sys/types.h>
39 #include <mdb/mdb_io.h>
50 typedef struct mdb_kb_ops
{
51 void *(*kb_open
)(const char *, const char *, const char *, int,
54 int (*kb_close
)(void *);
56 mdb_io_t
*(*kb_sym_io
)(void *, const char *);
58 ssize_t (*kb_kread
)(void *, uintptr_t, void *, size_t);
59 ssize_t (*kb_kwrite
)(void *, uintptr_t, const void *, size_t);
60 ssize_t (*kb_aread
)(void *, uintptr_t, void *, size_t, struct as
*);
61 ssize_t (*kb_awrite
)(void *, uintptr_t, const void *,
63 ssize_t (*kb_pread
)(void *, uint64_t, void *, size_t);
64 ssize_t (*kb_pwrite
)(void *, uint64_t, const void *, size_t);
66 uint64_t (*kb_vtop
)(void *, struct as
*, uintptr_t);
68 int (*kb_getmregs
)(void *, uint_t
, struct privmregs
*);
71 extern mdb_kb_ops_t
*libkvm_kb_ops(void);
79 #endif /* _MDB_KB_H */