[nSLUG] kernel debugging?

Dop Ganger nslug at fop.ns.ca
Tue Oct 21 18:21:10 ADT 2003


On Mon, 20 Oct 2003, Peter Cordes wrote:

>  Anyway, there's supposed to be a way to run GDB on the kernel, right?
> What tools are there to examine kernel data structures?  The processes are
> stuck, so I don't need to single-step the execution, just look at variables
> in memory.  I have multiple computers in the cluster I admin at Dal, so
> remote-debugging stuff is an option.

OProfile (http://oprofile.sourceforge.net) has usually done the trick for
me and might be worth looking at as a first line of attack. It's a
profiler and lets you see what's being called and is quite handy.
Recompile the kernel with profiling support, install oprofile, and off you
go.

Digging deeper, there's kdb (http://oss.sgi.com/projects/kdb/) and kgdb
(http://kgdb.sourceforge.net/), neither of which I've had to use for a
couple of years or so, so I'm probably not the best person to say which to
go for. kgdb runs from a second machine, and kdb runs on the machine being
diagnosed. I *think* that kdb is more likely to be what you need, although
kgdb is more powerful.

Cheers... Dop.




More information about the nSLUG mailing list