Subject: Re: Boot blocks croak on kernels with full debug table
To: Jordan K. Hubbard <jkh@time.cdrom.com>
From: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
List: port-i386
Date: 05/23/1996 16:59:49
> > What's the point of doing this?
> > 
> > If you're running kgdb remotely, you can stop execution of the kernel
> > (i.e. break)...  Given that, why would you ever want to use ddb, if
> > you have the setup to use kgdb?
> 
> Erm, maybe I'm just being thick

hmm.  8-)

> but how does kgdb talk to the kernel
> in your "setup to use kgdb?"  The kgdb I know of only debugs
> post-mortem dumps or lets you attach to a running kernel if you're on
> the same machine (not hanging off a serial line attached to it).

You've never actually seen proper use of kgdb, then...  8-)
Its real strong point is remote debugging over serial line.

see: Lite2-src:sys/i386/i386/kgdb_* and other sources in Lite2
(e.g. the 'com' driver) to see how it hooks into the i386 kernel.
(There are similar files in the hp300 subtree, and hooks in hp300
drivers.  In the sparc subtree as well.)

basically, you attach to a kernel running on a machine attached via
serial line in much the same way that you'd, say, attach to a running
process on your own machine.  can set breakpoints, etc., etc., etc.
It's invaluable for heavy debugging work, though unfortunately i've
only had the pleasure of using it on CSRG's 4.4BSD hp300 boxes.  (It's
been forever broken in the free BSD systems; see previous mail for the
reason that it 'started out broken.')


cgd