The .Fn function
The .Fa argument
This commit is contained in:
parent
0dc90c7a0d
commit
4cacb61823
@ -58,8 +58,9 @@ Memory can be read and written, kernel symbol addresses can be
|
|||||||
looked up efficiently, and information about user processes can
|
looked up efficiently, and information about user processes can
|
||||||
be gathered.
|
be gathered.
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Fn kvm_open
|
.Fn kvm_open
|
||||||
is first called to obtain a descriptor for all subsequent calls.
|
function is first called to obtain a descriptor for all subsequent calls.
|
||||||
.Sh COMPATIBILITY
|
.Sh COMPATIBILITY
|
||||||
The kvm interface was first introduced in SunOS. A considerable
|
The kvm interface was first introduced in SunOS. A considerable
|
||||||
number of programs have been developed that use this interface,
|
number of programs have been developed that use this interface,
|
||||||
|
@ -54,8 +54,9 @@
|
|||||||
.Ft char *
|
.Ft char *
|
||||||
.Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt"
|
.Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
The
|
||||||
.Fn kvm_getfiles
|
.Fn kvm_getfiles
|
||||||
returns a (sub-)set of the open files in the kernel indicated by
|
function returns a (sub-)set of the open files in the kernel indicated by
|
||||||
.Fa kd .
|
.Fa kd .
|
||||||
The
|
The
|
||||||
.Fa op
|
.Fa op
|
||||||
@ -72,8 +73,9 @@ This memory is owned by kvm and is not guaranteed to be persistent across
|
|||||||
subsequent kvm library calls. Data should be copied out if it needs to be
|
subsequent kvm library calls. Data should be copied out if it needs to be
|
||||||
saved.
|
saved.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
|
The
|
||||||
.Fn kvm_getfiles
|
.Fn kvm_getfiles
|
||||||
will return NULL on failure.
|
function will return NULL on failure.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
This routine does not belong in the kvm interface.
|
This routine does not belong in the kvm interface.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
@ -58,8 +58,9 @@
|
|||||||
.Ft char **
|
.Ft char **
|
||||||
.Fn kvm_getenvv "kvm_t *kd" "const struct kinfo_proc *p" "int nchr"
|
.Fn kvm_getenvv "kvm_t *kd" "const struct kinfo_proc *p" "int nchr"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
The
|
||||||
.Fn kvm_getprocs
|
.Fn kvm_getprocs
|
||||||
returns a (sub-)set of active processes in the kernel indicated by
|
function returns a (sub-)set of active processes in the kernel indicated by
|
||||||
.Fa kd .
|
.Fa kd .
|
||||||
The
|
The
|
||||||
.Fa op
|
.Fa op
|
||||||
@ -102,8 +103,9 @@ and
|
|||||||
.Fn kvm_close
|
.Fn kvm_close
|
||||||
will overwrite this storage.
|
will overwrite this storage.
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Fn kvm_getargv
|
.Fn kvm_getargv
|
||||||
returns a null-terminated argument vector that corresponds to the
|
function returns a null-terminated argument vector that corresponds to the
|
||||||
command line arguments passed to process indicated by
|
command line arguments passed to process indicated by
|
||||||
.Fa p .
|
.Fa p .
|
||||||
Most likely, these arguments correspond to the values passed to
|
Most likely, these arguments correspond to the values passed to
|
||||||
@ -144,11 +146,12 @@ function is similar to
|
|||||||
but returns the vector of environment strings. This data is
|
but returns the vector of environment strings. This data is
|
||||||
also alterable by the process.
|
also alterable by the process.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
|
The
|
||||||
.Fn kvm_getprocs ,
|
.Fn kvm_getprocs ,
|
||||||
.Fn kvm_getargv ,
|
.Fn kvm_getargv ,
|
||||||
and
|
and
|
||||||
.Fn kvm_getenvv ,
|
.Fn kvm_getenvv
|
||||||
all return
|
functions return
|
||||||
.Dv NULL
|
.Dv NULL
|
||||||
on failure.
|
on failure.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
|
@ -50,8 +50,9 @@
|
|||||||
.Ft int
|
.Ft int
|
||||||
.Fn kvm_nlist "kvm_t *kd" "struct nlist *nl"
|
.Fn kvm_nlist "kvm_t *kd" "struct nlist *nl"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
The
|
||||||
.Fn kvm_nlist
|
.Fn kvm_nlist
|
||||||
retrieves the symbol table entries indicated by the name list argument
|
function retrieves the symbol table entries indicated by the name list argument
|
||||||
.Fa \&nl .
|
.Fa \&nl .
|
||||||
This argument points to an array of nlist structures, terminated by
|
This argument points to an array of nlist structures, terminated by
|
||||||
an entry whose n_name field is
|
an entry whose n_name field is
|
||||||
@ -62,10 +63,11 @@ Each symbol is looked up using the n_name field, and if found, the
|
|||||||
corresponding n_type and n_value fields are filled in. These fields are set
|
corresponding n_type and n_value fields are filled in. These fields are set
|
||||||
to 0 if the symbol is not found.
|
to 0 if the symbol is not found.
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Xr kldsym 2
|
.Xr kldsym 2
|
||||||
is used to locate the symbol. This is a less than perfect emulation
|
system call is used to locate the symbol. This is a less than perfect
|
||||||
of the nlist values but has the advantage of being aware of kernel modules
|
emulation of the nlist values but has the advantage of being aware of kernel
|
||||||
and is reasonably fast.
|
modules and is reasonably fast.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
The
|
The
|
||||||
.Fn kvm_nlist
|
.Fn kvm_nlist
|
||||||
|
@ -66,8 +66,9 @@ via the
|
|||||||
library routines. Both active kernels and crash dumps are accessible
|
library routines. Both active kernels and crash dumps are accessible
|
||||||
through this interface.
|
through this interface.
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Fa execfile
|
.Fa execfile
|
||||||
is the executable image of the kernel being examined.
|
argument is the executable image of the kernel being examined.
|
||||||
This file must contain a symbol table.
|
This file must contain a symbol table.
|
||||||
If this argument is
|
If this argument is
|
||||||
.Dv NULL ,
|
.Dv NULL ,
|
||||||
@ -75,8 +76,9 @@ the currently running system is assumed,
|
|||||||
as determined from
|
as determined from
|
||||||
.Xr getbootfile 3 .
|
.Xr getbootfile 3 .
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Fa corefile
|
.Fa corefile
|
||||||
is the kernel memory device file. It can be either /dev/mem
|
argument is the kernel memory device file. It can be either /dev/mem
|
||||||
or a crash dump core generated by
|
or a crash dump core generated by
|
||||||
.Xr savecore 8 .
|
.Xr savecore 8 .
|
||||||
If
|
If
|
||||||
|
Loading…
x
Reference in New Issue
Block a user