


KVM_NLIST(3K)      KERNEL VM LIBRARY FUNCTIONS      KVM_NLIST(3K)



NAME
     kvm_nlist - get entries from kernel symbol table

SYNOPSIS
     #include <kvm.h>
     #include <nlist.h>

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

DESCRIPTION
     kvm_nlist() examines the symbol table from the kernel  image
     identified by _k_d (see kvm_open(3K)) and selectively extracts
     a list of values and puts  them  in  the  array  of  nlist()
     structures  pointed  to  by _n_l.  The name list pointed to by
     nl() consists of an array of  structures  containing  names,
     types  and  values.  The _n__n_a_m_e field of each such structure
     is taken to be a pointer to a character string  representing
     a  symbol  name.   The list is terminated by an entry with a
     NULL pointer (or a pointer to a null string) in  the  _n__n_a_m_e
     field.  For each entry in _n_l, if the named symbol is present
     in the kernel symbol table, its value and type are placed in
     the  _n__v_a_l_u_e  and  _n__t_y_p_e  fields.   If  a  symbol cannot be
     located, the corresponding _n__t_y_p_e field of nl()  is  set  to
     zero.

RETURN VALUES
     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__t_y_p_e fields in  members  of
     the array pointed to by nl to zero.

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




















Sun Release 4.1   Last change: 21 January 1990                  1



