Subject: Re: kernel serial debugging (kgdb) on i386: does it work?
To: John Kohl <jtk@kolvir.arlington-heights.ma.us>
From: Frank van der Linden <frank@wins.uva.nl>
List: port-i386
Date: 08/03/1997 23:47:52
On Thu, Jul 31, 1997 at 04:59:08PM -0400, John Kohl wrote:
> When last I cared (2 years ago), kernel remote serial debugging on i386
> didn't work.  Does it work now?  Anybody got sample configurations?

Yes, it works now. Sample: if the machine that you want to debug has
a serial line going from com1 (in NetBSD terms, not DOS), to com3 on
the other one, and your speed is 38400 bps:

	- compile a kernel with:
		- makeoptions	DEBUG="-g"
		- options KGDB, KGDBDEV=0x0801, KGDBRATE=38400
				^^^^^^^^^^^^^^
				makedev(commajor, 1)

	- boot that kernel on the machine that you want to debug.
	  use the -d option when booting to have it drop into kgdb
	  right away.

	- on the other machine (assuming that you did the compiling there),
	  go into the compile dir for the kernel on the other machine
	  and do:
		- you should probably have 'softcar' set for the serial line
		- gdb
		- file netbsd.gdb
		- set remotebaud 38400
		- target remote /dev/tty03

..and you should be in business.

- Frank