kvm_nlist.3 (112539) | kvm_nlist.3 (131504) |
---|---|
1.\" Copyright (c) 1992, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 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.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)kvm_nlist.3 8.1 (Berkeley) 6/4/93 | 1.\" Copyright (c) 1992, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 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.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)kvm_nlist.3 8.1 (Berkeley) 6/4/93 |
37.\" $FreeBSD: head/lib/libkvm/kvm_nlist.3 112539 2003-03-24 15:58:53Z charnier $ | 37.\" $FreeBSD: head/lib/libkvm/kvm_nlist.3 131504 2004-07-02 23:52:20Z ru $ |
38.\" 39.Dd June 4, 1993 40.Dt KVM_NLIST 3 41.Os 42.Sh NAME 43.Nm kvm_nlist 44.Nd retrieve symbol table names from a kernel image 45.Sh LIBRARY --- 9 unchanged lines hidden (view full) --- 55function retrieves the symbol table entries indicated by the name list argument 56.Fa \&nl . 57This argument points to an array of nlist structures, terminated by 58an entry whose n_name field is 59.Dv NULL 60(see 61.Xr nlist 3 ) . 62Each symbol is looked up using the n_name field, and if found, the | 38.\" 39.Dd June 4, 1993 40.Dt KVM_NLIST 3 41.Os 42.Sh NAME 43.Nm kvm_nlist 44.Nd retrieve symbol table names from a kernel image 45.Sh LIBRARY --- 9 unchanged lines hidden (view full) --- 55function retrieves the symbol table entries indicated by the name list argument 56.Fa \&nl . 57This argument points to an array of nlist structures, terminated by 58an entry whose n_name field is 59.Dv NULL 60(see 61.Xr nlist 3 ) . 62Each symbol is looked up using the n_name field, and if found, the |
63corresponding n_type and n_value fields are filled in. These fields are set | 63corresponding n_type and n_value fields are filled in. 64These fields are set |
64to 0 if the symbol is not found. 65.Pp 66The 67.Xr kldsym 2 | 65to 0 if the symbol is not found. 66.Pp 67The 68.Xr kldsym 2 |
68system call is used to locate the symbol. This is a less than perfect | 69system call is used to locate the symbol. 70This is a less than perfect |
69emulation of the nlist values but has the advantage of being aware of kernel 70modules and is reasonably fast. 71.Sh RETURN VALUES 72The 73.Fn kvm_nlist 74function returns the number of invalid entries found. 75If the kernel symbol table was unreadable, -1 is returned. 76.Sh SEE ALSO 77.Xr kldsym 2 , 78.Xr kvm 3 , 79.Xr kvm_close 3 , 80.Xr kvm_getargv 3 , 81.Xr kvm_getenvv 3 , 82.Xr kvm_geterr 3 , 83.Xr kvm_getprocs 3 , 84.Xr kvm_open 3 , 85.Xr kvm_openfiles 3 , 86.Xr kvm_read 3 , 87.Xr kvm_write 3 | 71emulation of the nlist values but has the advantage of being aware of kernel 72modules and is reasonably fast. 73.Sh RETURN VALUES 74The 75.Fn kvm_nlist 76function returns the number of invalid entries found. 77If the kernel symbol table was unreadable, -1 is returned. 78.Sh SEE ALSO 79.Xr kldsym 2 , 80.Xr kvm 3 , 81.Xr kvm_close 3 , 82.Xr kvm_getargv 3 , 83.Xr kvm_getenvv 3 , 84.Xr kvm_geterr 3 , 85.Xr kvm_getprocs 3 , 86.Xr kvm_open 3 , 87.Xr kvm_openfiles 3 , 88.Xr kvm_read 3 , 89.Xr kvm_write 3 |