Reputation: 11
Now a days debugging become so advanced that even 'core kernel source code' can be debugged using Virtual environment.
But after reading couple of blog related to Kernel Core development it was not clear whether they are debugging using Virtual environment.
They have mentioned that they rely on 'Printing message' rather than using debugging tool, at-least for core component.
So, I Request from 'Linux Kernel Experts' to let me know what is good practice followed while debugging Kernel?
Upvotes: 0
Views: 406
Reputation:
I've tried multiple approaches when trying to debug the kernel.
printk
statements based on my own conditional values, monitor the serial log and see what's going on. Its especially useful when the function in question is invoked quite often, but you are interested only in a subset of those.-s -S
flags, and attach gdb as target remote :1234
. Additionally, there aren't very many userspace processes in this setup so its easier to debug the kernel.Upvotes: 1