|KVM_DUMP_MKHEADER(3)||Library Functions Manual||KVM_DUMP_MKHEADER(3)|
kvm_dump_inval — crash dump
*kd, FILE *fp,
First note that the functions described here were designed to be used by savecore(8).
checks if the physical memory file associated with kd
contains a valid crash dump header as generated by a dumping kernel. When a
valid header is found,
initializes the internal kvm data structures as if a crash dump generated by
the savecore(8) program was opened.
This has the intentional side effect of enabling the address translation
A call to
will most likely be followed by a call to
This function takes care of generating the generic header, the
CORE_CPU section and the section header of the
CORE_DATA section. The data is written to the file
pointed at by fp. The dumpsize
argument is only used to properly set the segment size of the
CORE_DATA section. Note that this function assumes
that fp is positioned at file location 0. This
function will not seek and therefore allows fp to be a
file pointer obtained by
function clears the magic number in the physical memory file associated with
kd. The address translations must be enabled for this
to work (thus assuming that
called earlier in the sequence).
All functions return 0 on success, -1 on failure. In the case of failure, kvm_geterr(3) can be used to retrieve the cause of the error.
These functions first appeared in NetBSD 1.1A.
|November 10, 2015||OpenBSD-current|