From owner-freebsd-hackers Fri Aug 3 15:23:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pdxpo.dsl-only.net (sub16-3.member.dsl-only.net [63.105.16.3]) by hub.freebsd.org (Postfix) with ESMTP id C465B37B406 for ; Fri, 3 Aug 2001 15:23:23 -0700 (PDT) (envelope-from pdxmax@dsl-only.net) Received: from tabor.office.archimedesoft.com (unverified [63.105.19.225]) by pdxpo.dsl-only.net (Rockliffe SMTPRA 4.5.4) with ESMTP id ; Fri, 3 Aug 2001 15:19:07 -0700 Date: Fri, 3 Aug 2001 15:23:22 -0700 From: Tabor Kelly X-Mailer: The Bat! (v1.49) UNREG / CD5BF9353B3B7091 Reply-To: Tabor Kelly X-Priority: 3 (Normal) Message-ID: <137268305.20010803152322@dsl-only.net> To: Tabor Kelly Cc: freebsd-hackers@freebsd.org Subject: Re: problems with kvm_nlist() In-reply-To: <146809363.20010803141617@dsl-only.net> References: <146809363.20010803141617@dsl-only.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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