LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   debugging kernel modules (https://www.linuxquestions.org/questions/programming-9/debugging-kernel-modules-230305/)

saajii 09-13-2004 09:21 PM

debugging kernel modules
 
hey guys;

i am currently implementing a encryption decryption module.everytime i call decryption,my system hangs and after reboot i cant check the debug messages anymore.

does anyone have any idea as to how i can debug my module?

rjlee 09-14-2004 03:58 AM

While it is possible to gdb into the kernel, setting it up can be more hassle than it's worth (at the least, you need to patch and recompile your kernel). See the various kernel programming guides on http://www.tldp.org/ for where to find further information.

My advice is to work through your code by hand and look for a race condition or an infinite loop. This approach takes a little more work than using a debugger, but tends to find more bugs and mistakes.

Alternatively, comment out sections of the code systematically that are likely to be causing errors to find out where the bug is.


All times are GMT -5. The time now is 08:48 AM.