xref: /titanic_52/usr/src/lib/libkvm/common/llib-lkvm (revision 0eb822a1c0c2bea495647510b75f77f0e57633eb)
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/* LINTLIBRARY */
23/* PROTOLIB1 */
24
25/*
26 * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
27 * All rights reserved.
28 */
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31#include <stdlib.h>
32#include <stdio.h>
33#include <fcntl.h>
34#include <sys/proc.h>
35#include <sys/user.h>
36#include <kvm.h>
37
38kvm_t *kvm_open(const char *, const char *, const char *, int, const char *);
39int kvm_close(kvm_t *);
40int kvm_nlist(kvm_t *, struct nlist []);
41ssize_t kvm_read(kvm_t *, uintptr_t, void *, size_t);
42ssize_t kvm_kread(kvm_t *, uintptr_t, void *, size_t);
43ssize_t kvm_uread(kvm_t *, uintptr_t, void *, size_t);
44ssize_t kvm_aread(kvm_t *, uintptr_t, void *, size_t, struct as *);
45ssize_t kvm_pread(kvm_t *, uint64_t, void *, size_t);
46ssize_t kvm_write(kvm_t *, uintptr_t, const void *, size_t);
47ssize_t kvm_kwrite(kvm_t *, uintptr_t, const void *, size_t);
48ssize_t kvm_uwrite(kvm_t *, uintptr_t, const void *, size_t);
49ssize_t kvm_awrite(kvm_t *, uintptr_t, const void *, size_t, struct as *);
50ssize_t kvm_pwrite(kvm_t *, uint64_t, const void *, size_t);
51uint64_t kvm_physaddr(kvm_t *, struct as *, uintptr_t);
52proc_t *kvm_getproc(kvm_t *, pid_t);
53proc_t *kvm_nextproc(kvm_t *);
54int kvm_setproc(kvm_t *);
55user_t *kvm_getu(kvm_t *, struct proc *);
56int kvm_getcmd(kvm_t *, proc_t *, user_t *, char ***, char ***);
57