|
I started coding
for Linux kernel during my summer research at HIIT Finland.
Initially it was not easy (believe me!!) but gradually got a
hand on it. Some methods for debugging kernel are maintained by
me and Miika
here.
There are two
methods for debugging a kernel.
1. Use printk(KERN_DEBUG"blah blah blah\n"); and then mount the
kernel on VMWARE and use
dmesg
to find out the output of print command.
2. The easy way (not so easy to install) is to setup
UML and
compile the kernel using as follows
$ make menuconfig ARCH=um
$ make linux ARCH=um
This will make a binary linux of the kernel. Now run linux with
gdb
$gdb linux
A detailed
analysis and setup is given at the
help pages. The link is help page on UML installation and
debugging a running kernel using UML.
|