Hi all,
I'm using some free time to try to learn a better way to debug the kernel other than the (in)famous printk-compile-reboot method.
Reading the IBM's article(1) about kprobes didn't convinced me that kprobes is really THE solution. Ok, it's nice to be able to add printks without having to reboot the machine, but how usefull is this? Printing global kernel variables such as the processes list also doesn't help that much.
I tried to use it do fix a minor bug in my code but didn't manage to go too far. Have someone in the list already used it? Is disassembling really the only way of putting probes in the middle of a function? Since I have the source code, the object file, the compiler... I guess that maybe there is a way of getting the address from the line number of the source code or something like that.
Also, is there any way of reading the values of local variables?
Thanks,
Luciano Stertz
(1) http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/