Subject: Remote gdb-4.14 serial kernel debug support for NetBSD/Sparc
To: None <port-sparc@NetBSD.ORG>
From: None <abrown@eecs.harvard.edu>
List: port-sparc
Date: 08/28/1995 17:12:48
Hi all,

I recently hacked up the gdb-4.14 distribution so that it would support
remote kernel debugging of NetBSD/sparc over a serial line (null modem) 
connection. If any one is interested, the patches can be found on
ftp://rioja.eecs.harvard.edu/pub/gdb-4.14-k/gdb-4.14.kern.tar.gz

See the README file for installation instructions. You'll need a copy of 
gdb-4.14 (ftp://prep.ai.mit.edu/pub/gnu/gdb-4.14.tar.gz).

This is very nice for doing extensive kernel work--you get symbolic debugging
even with SunOS bootblocks, and you can break into a frozen kernel remotely
if interrupts are not disabled (not to mention all the other niceties that
gdb has but ddb doesn't...). Plus, gdb-4.14 supports cross-debugging. In fact,
I use this patched gdb-4.14 as a cross-debugger from a Solaris workstation
to my NetBSD target machine. Email me if you want to do this--it doesn't work
"out of the box", but it is pretty easy to fix.

Some caveats:

-- I have only tested this as a cross-debugger from Solaris, so I don't know
what will happen if it is used from NetBSD (I don't have 2 connected machines
to try)

-- If you use it as a cross-debugger, you'll have to substitute some NetBSD
header files. Email for more info.

-- No kernel corefile debugging is supported (yet)

-- I've only tested this through autoconfiguration. It should work during
   multiuser use, but no guarantees.

-- The standard gdb remote serial protocol is replaced by the LBL kgdb 
    protocol used in NetBSD's stub. You can't have both at once.

Enjoy!

(please let me know of any improvements/bugs you make or find. I may 
eventually integrate kcore support, but I've got other things to keep me 
busy for a while)

--Aaron

--
Aaron B. Brown
Harvard University 
abrown@eecs.harvard.edu