[CentOS-devel] Q: method for kernel module debugging

Sat Nov 7 23:22:14 UTC 2015
Jonathan Billings <billings at negate.org>

On Nov 7, 2015, at 2:56 PM, Ran Shalit <ranshalit at gmail.com> wrote:
> Thanks for this value information!
> As to the steps after prepearing vmlinux for debug:
> I also find the following important link:
> https://github.com/AltraMayor/XIA-for-Linux/wiki/Debugging-the-Linux-kernel
> But it seems that the kernel debugging metod described there is quite
> complex (qeuires virtualbox , nfs shared folder).
> I just wander if this is the method which is recommended & used for
> kernel module debugging.

Odd that it would suggest VirtualBox when kvm-based VMs are native to the kernel.  I’d use virsh to do the same thing, with fewer moving parts.

> I am intereseted in debugging a new kernel module which I will write
> (v4l pci express module)

It sounds like you’re going to be debugging a kernel module for physical hardware?  That makes a lot of the above URL useless — you want to use kdbg from a serial console attached to a physical system rather than a VM.

--
Jonathan Billings <billings at negate.org>