* Copyright (c) 1992 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)kvm_private.h 5.1 (Berkeley) %G%
* a string to be prepended to error messages
* provided for compatibility with sun's interface
* if this value is null, errors are saved in errbuf[]
char *errp
; /* XXX this can probably go away */
char errbuf
[_POSIX2_LINE_MAX
];
#define ISALIVE(kd) ((kd)->vmfd >= 0)
int pmfd
; /* physical memory file (or crashdump) */
int vmfd
; /* virtual memory file (-1 if crashdump) */
int swfd
; /* swap file (e.g., /dev/drum) */
int nlfd
; /* namelist file (e.g., /vmunix) */
struct kinfo_proc
*procbase
;
char *argspc
; /* (dynamic) storage for argv strings */
int arglen
; /* length of the above */
char **argv
; /* (dynamic) storage for argv pointers */
int argc
; /* length of above (not actual # present) */
* Kernel virtual address translation state. This only gets filled
* in for dead kernels; otherwise, the running kernel (i.e. kmem)
* will do the translations for us. It could be big, so we
* only allocate it if necessary.
* Functions used internally by kvm, but across kvm modules.
int _kvm_kvatop
__P((kvm_t
*, u_long
, u_long
*));
int _kvm_uvatop
__P((kvm_t
*, const struct proc
*, u_long
, u_long
*));
int _kvm_initvtop
__P((kvm_t
*));
void _kvm_freevtop
__P((kvm_t
*));
void _kvm_err
__P((kvm_t
*kd
, const char *program
, const char *fmt
, ...));
void _kvm_syserr
__P((kvm_t
*kd
, const char *program
, const char *fmt
, ...));
void *_kvm_malloc
__P((kvm_t
*kd
, size_t));
void _kvm_freeprocs
__P((kvm_t
*kd
));