Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

KVM_NLIST(3K)                                                    KVM_NLIST(3K)

       kvm_nlist - get entries from kernel symbol table

       #include <&lt;kvm.h>&gt;
       #include <&lt;nlist.h>&gt;

       int kvm_nlist(kd, nl)
       kvm_t *kd;
       struct nlist *nl;

       kvm_nlist()  examines the symbol table from the kernel image identified
       by kd (see kvm_open(3K)) and selectively extracts a list of values  and
       puts  them  in  the  array of nlist() structures pointed to by nl.  The
       name list pointed to by nl() consists of an array  of  structures  con-
       taining  names, types and values.  The n_name field of each such struc-
       ture is taken to be a pointer to a character string representing a sym-
       bol name.  The list is terminated by an entry with a NULL pointer (or a
       pointer to a null string) in the n_name field.  For each entry  in  nl,
       if  the  named  symbol is present in the kernel symbol table, its value
       and type are placed in the n_value and n_type fields.  If a symbol can-
       not be located, the corresponding n_type field of nl() is set to zero.

       On  success,  kvm_nlist()  returns  the number of symbols that were not
       located in the symbol table.  On failure, it returns -1 and sets all of
       the n_type fields in members of the array pointed to by nl to zero.

       kvm_open(3K), kvm_read(3K), nlist(3V), a.out(5)

                                21 January 1990                  KVM_NLIST(3K)