Subject: re: In search of pointers to driver debugging on SPARC
To: steven.grunza@dgms.com <steven.grunza@dgms.com>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 06/22/1999 11:53:07
   I've written some code, now it's time to compile and run.  How do I 
   watch the fireworks?  I'm guessing some form of gdb for kernel 
   debugging ( KGDB options in conf file ) but I don't know how to run 
   the kernel debugger once my code drops the system into it.

the old KGDB code for the sparc port is probably broken.  it used to
work until someone changed a bunch of the MI KGDB code a couple of
years ago.  so, unless you want to fix that up, you're a bit stuck as
far as kgdb goes.

there is, however, DDB, which is an in-kernel debugger, which is quite
useful...
   
   I'm running headless (no framebuffer) with a serial console on TTYA 
   and Ethernet.
   
   I'm assuming I'll have to use the serial console but after that ....
   
   Features of real interest
   	- How to drop into debugger before my driver loads

you can call "Debugger();" any time from code that is compied with DDB,
and it will drop into the debugging -- like a permentant break point.

   	- Load symbols for my driver

statically linked symbols will be available, but source-level is the
domain of KGDB only.

   	- Set a breakpoint in my driver

DDB has all this. see the ddb man page.

   	- Return to OS and automagically drop into debugger when my code is 
   called.


again, just call Debugger() or set a breakpoint.



hope this helps.