From 4cacb61823db2ecd54db447bc0a8a31fcef189d6 Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Mon, 24 Mar 2003 15:58:53 +0000 Subject: [PATCH] The .Fn function The .Fa argument --- lib/libkvm/kvm.3 | 3 ++- lib/libkvm/kvm_getfiles.3 | 6 ++++-- lib/libkvm/kvm_getprocs.3 | 11 +++++++---- lib/libkvm/kvm_nlist.3 | 10 ++++++---- lib/libkvm/kvm_open.3 | 6 ++++-- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/libkvm/kvm.3 b/lib/libkvm/kvm.3 index 35c0dbaabffd..c7a46d2eb59e 100644 --- a/lib/libkvm/kvm.3 +++ b/lib/libkvm/kvm.3 @@ -58,8 +58,9 @@ Memory can be read and written, kernel symbol addresses can be looked up efficiently, and information about user processes can be gathered. .Pp +The .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 The kvm interface was first introduced in SunOS. A considerable number of programs have been developed that use this interface, diff --git a/lib/libkvm/kvm_getfiles.3 b/lib/libkvm/kvm_getfiles.3 index 8f70ca4fff0f..c89a35cd8c5e 100644 --- a/lib/libkvm/kvm_getfiles.3 +++ b/lib/libkvm/kvm_getfiles.3 @@ -54,8 +54,9 @@ .Ft char * .Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt" .Sh DESCRIPTION +The .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 . The .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 saved. .Sh RETURN VALUES +The .Fn kvm_getfiles -will return NULL on failure. +function will return NULL on failure. .Sh BUGS This routine does not belong in the kvm interface. .Sh SEE ALSO diff --git a/lib/libkvm/kvm_getprocs.3 b/lib/libkvm/kvm_getprocs.3 index 15b9b3df33a0..c4846a8cb8f7 100644 --- a/lib/libkvm/kvm_getprocs.3 +++ b/lib/libkvm/kvm_getprocs.3 @@ -58,8 +58,9 @@ .Ft char ** .Fn kvm_getenvv "kvm_t *kd" "const struct kinfo_proc *p" "int nchr" .Sh DESCRIPTION +The .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 . The .Fa op @@ -102,8 +103,9 @@ and .Fn kvm_close will overwrite this storage. .Pp +The .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 .Fa p . 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 also alterable by the process. .Sh RETURN VALUES +The .Fn kvm_getprocs , .Fn kvm_getargv , and -.Fn kvm_getenvv , -all return +.Fn kvm_getenvv +functions return .Dv NULL on failure. .Sh BUGS diff --git a/lib/libkvm/kvm_nlist.3 b/lib/libkvm/kvm_nlist.3 index bb53858f6b88..c49bd3a0f1f4 100644 --- a/lib/libkvm/kvm_nlist.3 +++ b/lib/libkvm/kvm_nlist.3 @@ -50,8 +50,9 @@ .Ft int .Fn kvm_nlist "kvm_t *kd" "struct nlist *nl" .Sh DESCRIPTION +The .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 . This argument points to an array of nlist structures, terminated by 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 to 0 if the symbol is not found. .Pp +The .Xr kldsym 2 -is used to locate the symbol. This is a less than perfect emulation -of the nlist values but has the advantage of being aware of kernel modules -and is reasonably fast. +system call is used to locate the symbol. This is a less than perfect +emulation of the nlist values but has the advantage of being aware of kernel +modules and is reasonably fast. .Sh RETURN VALUES The .Fn kvm_nlist diff --git a/lib/libkvm/kvm_open.3 b/lib/libkvm/kvm_open.3 index 86a4cae74a81..0d2706e84c21 100644 --- a/lib/libkvm/kvm_open.3 +++ b/lib/libkvm/kvm_open.3 @@ -66,8 +66,9 @@ via the library routines. Both active kernels and crash dumps are accessible through this interface. .Pp +The .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. If this argument is .Dv NULL , @@ -75,8 +76,9 @@ the currently running system is assumed, as determined from .Xr getbootfile 3 . .Pp +The .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 .Xr savecore 8 . If