From owner-cvs-all Tue Dec 29 23:24:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA13676 for cvs-all-outgoing; Tue, 29 Dec 1998 23:24:44 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from firewall.reed.wattle.id.au (darren2.lnk.telstra.net [139.130.53.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA13670; Tue, 29 Dec 1998 23:24:40 -0800 (PST) (envelope-from darrenr@reed.wattle.id.au) Received: (from root@localhost) by firewall.reed.wattle.id.au (8.9.1/8.8.7) id HAA26366; Wed, 30 Dec 1998 07:24:19 GMT Received: from avalon.reed.wattle.id.au(192.168.1.1) by firewall.reed.wattle.id.au via smap (V1.3) id sma026364; Wed Dec 30 07:23:57 1998 Received: from percival.reed.wattle.id.au. (percival.reed.wattle.id.au [192.168.1.5]) by avalon.reed.wattle.id.au (8.9.0.Beta3/8.9.0.Beta3) with SMTP id SAA16755; Wed, 30 Dec 1998 18:23:57 +1100 (EST) From: Darren Reed Message-Id: <199812300723.SAA16755@avalon.reed.wattle.id.au> Subject: Re: kvm_nlist emulation of n_type from kld symbol table at runtime. To: peter@netplex.com.au (Peter Wemm) Date: Wed, 30 Dec 1998 18:23:56 +1100 (EST) Cc: phk@FreeBSD.ORG, committers@FreeBSD.ORG In-Reply-To: <199812300707.PAA84781@spinner.netplex.com.au> from "Peter Wemm" at Dec 30, 98 03:07:43 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In some email I received from Peter Wemm, sie wrote: > > Darren Reed wrote: > > > > If you're exporting symbols through something like a /dev/ksyms where > > you can do "nm /dev/ksyms" and get a human-readable listing of the in-kernel > > table, then n_type is essential (for obvious reasons). > > Yes, I thought about that a few times and I'm fairly convinced that doing > a /dev/ksyms will be Really Hard (tm) and/or resource expensive given the > way things are presently implemented. I don't think a /dev/ksyms needs to be "fast", but if implemented well could possibly be used with mmap(). > In a situation where there is a single loaded symbol table, this is easy. > However, we have multiple symbol tables and in multiple formats. Well, then you need to pick one which can be used as a superset of the two. I'd expect they're all storing the same sort of information so this shouldn't be too hard. > At > present, I think the majority of cases have an a.out kernel symbol table > and ELF module symbols. A coherent symbol table would have to be > constructed, and that would take a large block of memory to do it in one > chunk... I'm confused about what you're saying here, the need for n_type shouldn't go away because of a.out -> ELF. Solaris has a.out & ELF support and at least appears to still support nlist.h on both a.out and ELF binaries. > I'm really not sure how to best get large synthetic blocks of data out to > the user. I know sysctl(2) has enough trouble. Try creating a pseudo chracacter device, with a buffer and apply read(2) or mmap(2) where necessary. Darren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message