Debugging the Linux Kernel
Debugging kernel problems (or strange user-space interactions) can be hard. There are a variety of techniques that can be applied although first and foremost an understanding of the kernel and what its trying to do is the most useful. Some techniques include:
Review of the Source Code
Diagnoses of oops traces
Tracing system behaviour using the Linux Trace Toolkit
Debugging using gdb (either via kgdb or an ICE)
See also GDB Scripts
Wiki