Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Aug 2001 15:23:22 -0700
From:      Tabor Kelly <pdxmax@dsl-only.net>
To:        Tabor Kelly <pdxmax@dsl-only.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: problems with kvm_nlist()
Message-ID:  <137268305.20010803152322@dsl-only.net>
In-Reply-To: <146809363.20010803141617@dsl-only.net>
References:  <146809363.20010803141617@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
As Ian Dowse pointed out, it is not a problem with kvm_nlist(), but
with my program (line 75, character 65 should be an "i", not a "0"). Sorry.

Now that that is taken care of, would somebody mind explaining to me
what n_value represents? Is it an offset in kernel memory to retrieve
the actual data?

Thank You,

Tabor Kelly

On Friday, August 03, 2001, 2:16:17 PM, Tabor wrote:

I am using kvm_nlist() in one of my programs. I have written a smaller
test program for use here. Either kvm_nlist() has a bug or I am very
confused.

According to kvm_nlist(3), kvm_nlist should go through an array of
nlist structures and fill out each structure with that symbol's
information. Well, as far as I can tell, it fills out all of the
structures with the information from the symbol in the first
structure.

Has anybody else seen this behavior? Attached is a file named
test.cpp that should reproduce this behavior. If you want to play with
this behavior, change what structure is pointed to when calling
kvm_nlist on line 38 of the program source.

Also, be aware that you will have to make the following modifications
to the file permissions after you compile it (if you don't want to run
it as root):

# chown root:kmem a.out
# chmod g+s a.out

Thank You,

Tabor Kelly



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?137268305.20010803152322>