[pvrusb2] Kernel & Kernel Modules with GDB

Mike Isely isely at isely.net
Wed Aug 26 01:31:58 CDT 2009


On Tue, 18 Aug 2009, Roger wrote:

> Hey Mike.
> 
> In the process of setting up KGDB here.

Have fun.

> 
> Where's a good starting place to start debugging the kernel modules?

Usually it's all printk() for me here (or some slightly clever 
additional nodes temporarily dropped into the sysfs interface).  I've 
used gdb to remotely debug other operating system configurations 
(VxWorks, specifically).  But I've never tried this with Linux - though 
I know it's possible.  So far I haven't hit a bug sufficiently baffling 
that I wasn't able to finally figure it out through other means.


> 
> KGDB is being finicky over serial console right now (even though I have
> a working implementation for logging), but I'm thinking I can easily use
> GDB on the current system for debugging these higher level kernel code &
> modules right?
> 
> Or am I wrong and need KGDB setup instead of just using GDB on the
> native system?
> 

No real idea here, since I don't use kgdb.  I'd probably start with a 
bunch of google searches.  Last time I read about this style of 
debugging, you had to first apply some custom kernel patches, since 
Linus historically has not been a big fan of using debuggers on kernels.

Also, this sort of question is not really relevant to this list.

  -Mike


-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list