From nobody  Fri Oct 23 12:08:56 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id MAA01138;
          Fri, 23 Oct 1998 12:08:56 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199810231908.MAA01138@hub.freebsd.org>
Date: Fri, 23 Oct 1998 12:08:56 -0700 (PDT)
From: cmetz@inner.net
To: freebsd-gnats-submit@freebsd.org
Subject: 3.0's gdb can't read 3.0's kernel to debug dumps
X-Send-Pr-Version: www-1.0

>Number:         8425
>Category:       gnu
>Synopsis:       3.0's gdb can't read 3.0's kernel to debug dumps
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 23 12:10:00 PDT 1998
>Closed-Date:    Thu May 13 12:56:04 PDT 1999
>Last-Modified:  Thu May 13 12:58:48 PDT 1999
>Originator:     Craig Metz
>Release:        3.0-RELEASE
>Organization:
>Environment:
>Description:
The gdb shipped with 3.0 doesn't seem to recognize a.out anymore, and it
can't read /kernel or /var/crash/kernel.*; this makes kernel core dumps
not nearly as useful as they should be. The gdb shipped with earlier
versions of FreeBSD doesn't seem to be able to read 3.0's core dumps
either.

>How-To-Repeat:
Cause 3.0 to core dump (an exercise left to the reader)

gdb /var/crash/kernel.0

>Fix:

>Release-Note:
>Audit-Trail:

From: Jin Guojun (FTG staff) <jin@george.lbl.gov>
To: cmetz@inner.net, freebsd-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: gnu/8425: 3.0's gdb can't read 3.0's kernel to debug dumps
Date: Fri, 23 Oct 1998 12:49:44 -0700 (PDT)

 It becauses that kernel uses aout format, but user space uses elf format.
 It is messy now.
 For debug kernel, go get one at ftp://ftp.lemis.com/pub/vinum/gdb-aout.
 
 	-Jin

From: Craig Metz <cmetz@inner.net>
To: Jin Guojun (FTG staff) <jin@george.lbl.gov>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/8425: 3.0's gdb can't read 3.0's kernel to debug dumps 
Date: Tue, 27 Oct 1998 08:07:47 -0500

 In message <199810231949.MAA11501@george.lbl.gov>, you write:
 >It becauses that kernel uses aout format, but user space uses elf format.
 >It is messy now.
 >For debug kernel, go get one at ftp://ftp.lemis.com/pub/vinum/gdb-aout.
 
 envy# ./gdb /var/crash/kernel.1
 GDB is free software and you are welcome to 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.
 GDB 4.16 (i386-unknown-freebsd), 
 Copyright 1996 Free Software Foundation, Inc...
 (gdb) target kcore /var/crash/vmcore.1
 IdlePTD 272000
 kernel symbol `kstack' not found.
 (gdb)
 
 									-Craig

From: Jin Guojun (FTG staff) <jin@george.lbl.gov>
To: cmetz@inner.net
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/8425: 3.0's gdb can't read 3.0's kernel to debug dumps
Date: Tue, 27 Oct 1998 09:57:05 -0800 (PST)

 From: Craig Metz <cmetz@inner.net>
 > envy# ./gdb /var/crash/kernel.1
 > GDB is free software and you are welcome to 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.
 > GDB 4.16 (i386-unknown-freebsd), 
 > Copyright 1996 Free Software Foundation, Inc...
 > (gdb) target kcore /var/crash/vmcore.1
 > IdlePTD 272000
 > kernel symbol `kstack' not found.
 
 I have no idea what symbol `kstack' is. It is not in the GENERIC kernel.
 Is it possible your customized kernel?
 At least to debug kernel, you should do this:
 
 	gdb -k kernel.1 vmcore.1
 
 -Jin
 .
 
State-Changed-From-To: open->closed 
State-Changed-By: dt 
State-Changed-When: Thu May 13 12:56:04 PDT 1999 
State-Changed-Why:  
In 3.1-RELEASE and later, the kernel is in elf format by default. 
It was possible to build elf kernel or aout gdb in 3.0-RELEASE, as a workaround. 
>Unformatted:
