Subject: kern/1294: GDB can kinda debug kernels and crashes
To: None <gnats-bugs@NetBSD.ORG>
From: Gordon W. Ross <gwr@mc.com>
List: netbsd-bugs
Date: 07/31/1995 10:49:13
> Date: Fri, 28 Jul 1995 13:10:50 -0500 (CDT)
> From: James Jegers <jimj@miller.cs.uwm.edu>
> Sender: owner-netbsd-bugs@netbsd.org
> >Number: 1294
> >Category: kern
> >Synopsis: GDB almost works on kernels
> >Confidential: yes
> >Severity: non-critical
> >Priority: medium
> >Responsible: kern-bug-people (Kernel Bug People)
> >State: open
> >Class: change-request
> >Submitter-Id: net
> >Arrival-Date: Fri Jul 28 14:20:00 1995
> >Last-Modified:
> >Originator: James Jegers
> >Organization:
>
> >Release: Current as of Jul 5<NetBSD-current source date>
> >Environment:
>
> System: NetBSD jimj.home.edu 1.0A NetBSD 1.0A (JIMJ) #4: Fri Jul 28 09:42:32 CDT 1995 jimj@jimj.home.edu:/usr/src/sys/arch/i386/compile/JIMJ i386
>
> >Description:
> After wanting a better debugger for the kernel for some time. I really
> started playing with it and kinda got it to work.
> There are two sets of patches here, one is for the gdb to make it
> read in a kernel panic/crash file or the live kernel. I'm still having
> problems getting the stack output to look ok. sometimes it works and
> sometimes it doesn't. I'm not sure if we ever can get the correct
> information..???
> The other patch is to the kernel to allow user programs to read the
> kernel stack from /dev/kmem. currently access is denied. I'm not
> sure if this fix is the correct way to do it. It looks like the i386
> port is in flux.
>
> >How-To-Repeat:
>
> >Fix:
>
> diff -c2 ../../gdb/gdb/kcorelow.c ./kcorelow.c
Gak! This fix would stick i386 stuff in machine independent code!
This clearly needs more thought...
Gordon Ross