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

Sat Nov 7 19:56:30 UTC 2015
Ran Shalit <ranshalit at gmail.com>

On Sat, Nov 7, 2015 at 4:24 PM, Jonathan Billings <billings at negate.org> wrote:
> On Nov 7, 2015, at 4:03 AM, Ran Shalit <ranshalit at gmail.com> wrote:
>> I am new with CentOs, and more familiar with small linux kernel Sdk.
>> I would like to ask if it is possible to kernel debug ( and kernel
>> module debug in particular) CentOs kernel module, and how ?
>> I am using I7 Intel architrecture.
>

> You can install the kernel-debug package with the same version of the kernel that you are debugging, it’ll contain a vmlinux built the same as the non-debug version, just with the debugging symbols included.
>

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.



> Are you interested in debugging a kernel crash core?  or use some of the kernel trace/probes to examine a running kernel?
>

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

Regards,
Ran