Subject: Re: Kernel crashed, what now?
To: Steven Grunza <steven_grunza@ieee.org>
From: David Maxwell <david@vex.net>
List: port-sparc
Date: 03/07/2002 11:07:29
On Thu, Mar 07, 2002 at 09:43:36AM -0500, Steven Grunza wrote:
> My SS10 has been running 1.5.1 for a while without problems.  Today it was 
> sitting at the single-user boot prompt after apparently panicing during the 
> night.
> 
> How can I figure out what happened?  Looking at /var/crash shows netbsd.0 
> and netbsd.0.core.Z
> 
> I copied them to a directory with more space, uncompressed the core file 
> and ran gdb netbsd.0 netbsd.0.core but gdb didn't recognize the core file....
> 
> drwxr-xr-x  2 grunzasr  staff       512 Feb  5 09:24 grunzasr/
> -rw-r--r--  1 root      wheel   2821663 Mar  7 09:36 netbsd.0
> -rw-r--r--  1 root      wheel  66363928 Mar  7 09:23 netbsd.0.core
> grunza@hw-sbus 27% gdb netbsd.0 netbsd.0.core
> GNU gdb 4.17
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "sparc--netbsd"...(no debugging symbols found)...
> 
> "/usr/export/home/netbsd.0.core" is not a core dump: File format not recognized

Kernel core files shouldn't be supplied as a command line argument.
Instead, leave that out, and enter 'target kcore netbsd.0.core' at the
gdb prompt.

Also, you won't have a full set of symbols available if you use
'netbsd.0' as your kernel. Ideally, you want a netbsd.gdb, which you
would get by uncommenting the following, in your kernel config.

makeoptions    DEBUG="-g"      # compile full symbol table

Note that you boot from the generated netbsd kernel, the netbsd.gdb is
for gdb use (live, or portmortem).

-- 
David Maxwell, david@vex.net|david@maxwell.net --> Although some of you out
there might find a microwave oven controlled by a Unix system an attractive
idea, controlling a microwave oven is easily accomplished with the smallest
of microcontrollers. - Russ Hersch - (Microcontroller primer and FAQ)