Subject: Re: kernel postmortem?
To: None <j-valdes@uchicago.edu>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 05/27/1999 05:11:10
On Wed, 26 May 1999, John Valdes wrote:

> > I can't seem to get any useful information [out of the core file
> > saved by savecore], eg:
> > 
> >   (gdb) backtrace
> >   #0  0x0 in ?? ()
> >   (gdb) info registers
> >   d0             0x0      0
> >   d1             0x0      0
> >   d2             0x0      0
> >   d3             0x0      0
> >   d4             0x0      0
> >   d5             0x0      0
> >   d6             0x0      0
> >   d7             0x0      0

Does "panic()" save all the registers? I expect it has to save %PC and
%SF, at least.

> D'oh!  I just occurred to me that if the system can't create a core
> file for the perl process but panics instead, then it would probably
> be equally unable to create a core image of the kernel in swap, and so
> the core file created by savecore is probably useless.

But you're not running perl compiled for 1.3, are you? The solution to
that problem is to recompile perl. In your case, it may be that the stack
is getting corrupted, ergo, no useful stack trace.

> Oh, well; unless someone has another suggestion, it looks like I'm
> stuck using the kernel debugger... (which actually isn't that bad;
> it'd just be nice to be able to look at source code at the same
> time).

I have gotten a stack trace out gdb before. Sometimes, though, you can't
even get one out of ddb; no coredump either. Whatever works.