Subject: Re: And just how big can it be? (Sun3/50 kernels..)
To: None <woods@planix.com>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 11/24/1997 16:17:57
> Date: Mon, 24 Nov 1997 14:36:58 -0500 (EST)
> From: woods@most.weird.com (Greg A. Woods)
> 
> > True, but this case is unusual, because the kernel boot loader
> > copies the symbols into memory after BSS, and the kernel saves
> > the symbol table if DDB is included in the configuration.
> 
> Hmmm..... That's interesting.  I hadn't realized that, but I guess given
> the potentially shaky position the DDB could find itself in this is the
> only way it can possibly have access to the symbol table.  Is this
> documented anywhere?

Not that I've seen.  (Just in the source code.)

> Is this information also included in the kernel dump and thus saved by
> savecore?  (I assume so since it seems savecore does the right thing and
> squirrels away a copy of all of RAM, which leaves all processes that
> were on the swap device that's usually the dump device too out to dry.)

Yes, dump saves all of physical RAM.

> Is this information available after the fact to 'gdb -k' or its new
> moral equivalent?  If so I guess that means I don't have to remember
> which kernel goes with which savecore, right?  But I doubt it's so....

One might be able to resurrect a kernel image from a dump where DDB
has preserved the symbols, but I doubt it's worth the hassle.

> Savecore doesn't seem to be smart enough to know when it might not need
> to copy the kernel yet I can't quite understand why it's never copied
> the kernel for me even after apparently successfully copying the core
> image from the dump device.
> 
> As per my PR (4511 I think -- I can't connect to www.netbsd.org just now
> to check) on savecore I don't think it should exit after the warnings
> about possibly incomplete saves (i.e. after the err2: label), but rather
> just continue on and finish saving the system image (kernel) too.

I haven't had time to look into that problem yet.

> Is there anything else that's different or unique about the DDB and the
> savecore process on NetBSD/sun3?

The preservation of symbols by kernels with DDB is common to all ports.

The only unusual thing about savecore on the sun3 is that the machine-
dependent kernel core header has some MMU state needed by libkvm.