Subject: Re: kernel & libkvm [was IIci success]
To: None <current-users@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: current-users
Date: 01/05/1996 10:10:58
>From: wrstuden@loki.stanford.edu (Bill Studenmund)
>Date: Thu, 4 Jan 1996 09:34:52 -0800 (PST)

>My thought is that they look at /netbsd when they want the real kernel
>(when we're looking at the live kernel). But isn't the real kernel
>in RAM at that time? Isn't all the info that was in the disk-version of
>the running kernel still in RAM?

Not necessarily; and even if it's all there (for the sake of DDB) it's
not easily accessible.  The kvm code needs the kernel image's symbol
table in order to be able to associate function and variable names
with kmem offsets.

>So my thought is to add another file to kernfs, which would look at
>the live kernel & make it look like it did on disk.

This is a reasonable idea; but since kernfs is optional, it's not the
ideal solution.  Something like Solaris' (ugh, I know, but it's not
all bad) /dev/ksyms (*) might work.  I haven't had the time to look
into it, though. :-/

(*) AFAIK, /dev/ksyms produces a 'fake' executable containing the
running kernel's symbol table when read.  If that's not the case,
tell me.
-- 
Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil