LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-13-2004, 09:21 PM   #1
saajii
Member
 
Registered: Sep 2003
Location: sydney
Distribution: Redhat 8.0
Posts: 36

Rep: Reputation: 15
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?
 
Old 09-14-2004, 03:58 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 Remote Kernel Debugging gratner Fedora 2 11-02-2005 05:40 PM
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM
Kernel Linux Debugging Igor007 Programming 2 09-05-2005 02:10 PM
remote kernel debugging over a serial line swaroop Linux - Software 0 03-24-2005 12:58 AM
kernel debugging - can't boot? andrewlkho Linux - General 4 05-31-2004 04:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration