Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 1996 17:45:33 -0700
From:      Nate Williams <nate@sri.MT.net>
To:        "Kaleb S. KEITHLEY" <kaleb@x.org>
Cc:        hackers@freefall.freebsd.org
Subject:   Re: Whither ddb
Message-ID:  <199602240045.RAA24087@rocky.sri.MT.net>
In-Reply-To: <199602240021.AAA00739@exalt.x.org>
References:  <199602240021.AAA00739@exalt.x.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Color me ignorant. I've jumped into kernel hacking on my 2.1R system 
> with both feet and but now I've run into a roadblock.
> 
> `man -k debug` hints at ddb. `man ddb` says it's a better replacement for 
> kdb. I've built ddb support into my kernel? Is there supposed to be a
> separate ddb program?

Nope, it's part of the kernel.  See /sys/ddb.

Also, you can jump directly into ddb at bootup by booting with -d I
believe.

Else, if you are using syscons <CTL><ALT><ESC> brings you and it's
enabled in your keymap.

> What exactly is the strategy for debugging a kernel?

Find out where it's dying, and then backtrace from there.  I haven't
actually fixed anything in the kernel, but I did find out where it
wasn't working by using DDB to find the offending code, and then setting
a break-point with DDB just before and stepping through the code (ugh.)

Either that, or look at the core dumps (assuming you've enabled them) to
find out where the bug is with gdb and then single stepping through the
code.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602240045.RAA24087>