add psize to the recno structure, to pass down to the btree
[unix-history] / usr / src / lib / libkvm / kvm_nlist.3
CommitLineData
b8b13822
KM
1.\" Copyright (c) 1992 The Regents of the University of California.
2.\" All rights reserved.
3.\"
1741f35d
KB
4.\" This code is derived from software developed by the Computer Systems
5.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
6.\" BG 91-66 and contributed to Berkeley.
7.\"
b8b13822
KM
8.\" %sccs.include.redist.man%
9.\"
1741f35d 10.\" @(#)kvm_nlist.3 5.5 (Berkeley) %G%
b8b13822
KM
11.\"
12.Dd
13.Dt KVM_NLIST 3
14.Os
15.Sh NAME
33c00714 16.Nm kvm_nlist
b8b13822
KM
17.Nd retrieve symbol table names from a kernel image
18.Sh SYNOPSIS
19.Fd #include <kvm.h>
20.Fd #include <nlist.h>
b8b13822
KM
21.Ft int
22.Fn kvm_nlist "kvm_t *kd" "struct nlist *nl"
23.Sh DESCRIPTION
24.Fn kvm_nlist
25retrieves the symbol table entries indicated by the name list argument
33c00714 26.Fa \&nl .
b8b13822 27This argument points to an array of nlist structures, terminated by
33c00714
KM
28an entry whose n_name field is
29.Dv NULL
30(see
31.Xr nlist 3 ) .
c9c64c8b 32Each symbol is looked up using the n_name field, and if found, the
b8b13822
KM
33corresponding n_type and n_value fields are filled in. These fields are set
34to 0 if the symbol is not found.
35.Pp
33c00714 36The program
c9c64c8b 37.Xr kvm_mkdb 8
b8b13822
KM
38builds a database from the running kernel's namelist.
39If the database matches the opened kernel,
40.Fn kvm_nlist
c9c64c8b 41uses it to speed lookups.
b8b13822 42.Sh RETURN VALUES
c9c64c8b 43The
b8b13822 44.Fn kvm_nlist
c9c64c8b 45function returns the number of invalid entries found.
b8b13822
KM
46If the kernel symbol table was unreadable, -1 is returned.
47.Sh FILES
b8dc4649
KB
48.Bl -tag -width /var/db/kvm_vmunix.db -compact
49.It Pa /var/db/kvm_vmunix.db
33c00714 50.El
b8b13822 51.Sh SEE ALSO
33c00714 52.Xr kvm 3 ,
c9c64c8b
KB
53.Xr kvm_close 3 ,
54.Xr kvm_getargv 3 ,
55.Xr kvm_getenvv 3 ,
56.Xr kvm_geterr 3 ,
57.Xr kvm_getprocs 3 ,
58.Xr kvm_open 3 ,
59.Xr kvm_openfiles 3 ,
60.Xr kvm_read 3 ,
61.Xr kvm_write 3 ,
b8b13822 62.Xr kvm_mkdb 8