diff options
author | peter <peter@FreeBSD.org> | 1999-12-27 07:14:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-12-27 07:14:58 +0000 |
commit | 047fa82dd05146cf34e7c0f9fe16e2f4a5fa741f (patch) | |
tree | bf612c2f85cc36d2b54233162227b2975c37fd0a /lib/libkvm/kvm_nlist.3 | |
parent | 04cead132ddb264f917bbce4fd71d663b16aa645 (diff) | |
download | FreeBSD-src-047fa82dd05146cf34e7c0f9fe16e2f4a5fa741f.zip FreeBSD-src-047fa82dd05146cf34e7c0f9fe16e2f4a5fa741f.tar.gz |
Use kldsym(2) to lookup symbol values. This avoids the kvm_mkdb juggling
and is module aware. Yes, this means that kvm_nlist(3) will find symbols
in loaded modules. The emulation of the nlist struct is pretty crude but
seems to work well enough for all the users in the tree that I found.
Diffstat (limited to 'lib/libkvm/kvm_nlist.3')
-rw-r--r-- | lib/libkvm/kvm_nlist.3 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libkvm/kvm_nlist.3 b/lib/libkvm/kvm_nlist.3 index f5611b3..b01930b 100644 --- a/lib/libkvm/kvm_nlist.3 +++ b/lib/libkvm/kvm_nlist.3 @@ -60,12 +60,10 @@ 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 program -.Xr kvm_mkdb 8 -builds a database from the running kernel's namelist. -If the database matches the opened kernel, -.Fn kvm_nlist -uses it to speed lookups. +.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. .Sh RETURN VALUES The .Fn kvm_nlist @@ -76,6 +74,7 @@ If the kernel symbol table was unreadable, -1 is returned. .It Pa /var/db/kvm_kernel.db .El .Sh SEE ALSO +.Xr kldsym 2 , .Xr kvm 3 , .Xr kvm_close 3 , .Xr kvm_getargv 3 , @@ -85,5 +84,4 @@ If the kernel symbol table was unreadable, -1 is returned. .Xr kvm_open 3 , .Xr kvm_openfiles 3 , .Xr kvm_read 3 , -.Xr kvm_write 3 , -.Xr kvm_mkdb 8 +.Xr kvm_write 3 |