Changeset View
Changeset View
Standalone View
Standalone View
lib/libkvm/kvm.3
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
To overcome this, the | To overcome this, the | ||||
.Bx | .Bx | ||||
interface includes a | interface includes a | ||||
routine, | routine, | ||||
.Xr kvm_geterr 3 , | .Xr kvm_geterr 3 , | ||||
to return (not print out) the error message | to return (not print out) the error message | ||||
corresponding to the most recent error condition on the | corresponding to the most recent error condition on the | ||||
given descriptor. | given descriptor. | ||||
.Sh CROSS DEBUGGING | |||||
The | |||||
.Nm | |||||
library supports inspection of crash dumps from non-native kernels. | |||||
Only a limited subset of the kvm interface is supported for these dumps. | |||||
To inspect a crash dump of a non-native kernel, | |||||
the caller must provide a | |||||
.Fa resolver | |||||
function when opening a descriptor via | |||||
.Fn kvm_open2 . | |||||
In addition, | |||||
the kvm interface defines an integer type | |||||
.Pq Vt kvaddr_t | |||||
that is large enough to hold all valid addresses of all supported | |||||
architectures. | |||||
The interface also defines a new namelist structure type | |||||
.Pq Vt "struct kvm_nlist" | |||||
for use with | |||||
.Fn kvm_nlist2 . | |||||
To avoid address truncation issues, | |||||
the caller should use | |||||
.Fn kvm_nlist2 | |||||
and | |||||
.Fn kvm_read2 | |||||
in place of | |||||
.Fn kvm_nlist | |||||
and | |||||
.Fn kvm_read , | |||||
respectively. | |||||
Finally, only a limited subset of operations are supported for non-native | |||||
crash dumps: | |||||
.Fn kvm_close , | |||||
.Fn kvm_geterr | |||||
.Fn kvm_open2 , | |||||
.Fn kvm_native , | |||||
.Fn kvm_nlist2 , | |||||
and | |||||
.Fn kvm_read2 . | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr kvm_close 3 , | .Xr kvm_close 3 , | ||||
.Xr kvm_getargv 3 , | .Xr kvm_getargv 3 , | ||||
.Xr kvm_getenvv 3 , | .Xr kvm_getenvv 3 , | ||||
.Xr kvm_geterr 3 , | .Xr kvm_geterr 3 , | ||||
.Xr kvm_getfiles 3 , | .Xr kvm_getfiles 3 , | ||||
.Xr kvm_getloadavg 3 , | .Xr kvm_getloadavg 3 , | ||||
.Xr kvm_getprocs 3 , | .Xr kvm_getprocs 3 , | ||||
.Xr kvm_getswapinfo 3 , | .Xr kvm_getswapinfo 3 , | ||||
.Xr kvm_native 3 , | |||||
.Xr kvm_nlist 3 , | .Xr kvm_nlist 3 , | ||||
.Xr kvm_nlist2 3 , | |||||
.Xr kvm_open 3 , | .Xr kvm_open 3 , | ||||
.Xr kvm_open2 3 , | |||||
.Xr kvm_openfiles 3 , | .Xr kvm_openfiles 3 , | ||||
.Xr kvm_read 3 , | .Xr kvm_read 3 , | ||||
.Xr kvm_read2 3 , | |||||
.Xr kvm_write 3 , | .Xr kvm_write 3 , | ||||
.Xr sysctl 3 , | .Xr sysctl 3 , | ||||
.Xr kmem 4 , | .Xr kmem 4 , | ||||
.Xr mem 4 | .Xr mem 4 |