[CentOS] How do I debug the kernel?

Tue Mar 6 22:47:47 UTC 2007
Rodrigo Barbosa <rodrigob at darkover.org>

Hash: SHA1

On Tue, Mar 06, 2007 at 05:40:30PM -0500, James Olin Oden wrote:
> On 3/6/07, Rodrigo Barbosa <rodrigob at darkover.org> wrote:
> >On Tue, Mar 06, 2007 at 04:38:21PM -0500, James Olin Oden wrote:
> >> On 3/6/07, Rodrigo Barbosa <rodrigob at darkover.org> wrote:
> >> >> >Humm, not that I know of. And considering we are talking about PC
> >> >hardware
> >> >> >here (are we?), I can't imagine how it can be possible.
> >> >> I'm definately no expert here, but PC hardware has many hardware level
> >> >> debuging hooks that apps such as oprofile take advantage of.
> >> >
> >> >Sure does, but how does one recover from a hardware lockup ?
> >> >
> >> Well say the PCI buses timing gets hosed and the whole system seizes
> >> up what do you intened to do at that point (that is a hardware
> >> lockup)?  And what does that thing you do have to do with debuging a
> >> kernel?  Just curious.
> >
> >A hardware lockup can be induced by software (quite easily, actually).
> I'm still not following you.  Its one thing for the "kernel" to lockup
> and its another for the hardware to lockup.  Could you give an
> example?

Not from the top of my head, no. I haven't messed around with kernel
code for something like 6 years. But I do remember seeing this kind of
thing happening. Maybe some MMU related function, but I'm not sure.

> >On a 2 computers debug environment, you can see it happening and get
> >enough data to fix it.
> Provided the processor is still functioning in some way, sure.

You will get the data previous to the lockup, since kgdb would first
then the debug data, and then execute the function. gdb itself would be
running on the second computer.

> >And yes, jtag is also quite nice, but I never saw anything like that on a
> >PC. Used them on some MIPS boards.
> Its definately on higher end Intel and AMD boards.

JTAG ? Nice. I'll start looking for those on my next boards. Tkx for the


- -- 
Rodrigo Barbosa
"Quid quid Latine dictum sit, altum viditur"
"Be excellent to each other ..." - Bill & Ted (Wyld Stallyns)

Version: GnuPG v1.4.5 (GNU/Linux)