#include <kvm.h>
int kvm_read(kd, addr, buf, nbytes) kvm_t *kd; unsigned long addr; char *buf; unsigned nbytes;
int kvm_write(kd, addr, buf, nbytes) kvm_t *kd; unsigned long addr; char *buf; unsigned nbytes;
kvm_read() transfers data from the kernel image specified by kd (see kvm_open.3k to the address space of the process. nbytes bytes of data are copied from the kernel virtual address given by addr to the buffer pointed to by buf.
kvm_write() is like kvm_read(), except that the direction of data transfer is reversed. In order to use this function, the kvm_open.3k call that returned kd must have specified write access. If a user virtual address is given, it is resolved in the address space of the process specified in the most recent kvm_getu.3k call.
On success, kvm_read() and kvm_write() return the number of bytes actually transferred. On failure, they return -1.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97