LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-13-2006, 03:28 AM   #1
Siva4Linux
Member
 
Registered: Sep 2006
Posts: 31
Blog Entries: 1

Rep: Reputation: 15
Runnig a program in debugging mode at Kernel level


Hello there,

I have been using the Intel Pro/Wireless IPW2200BG card in my wireless testbed, and I wish to obtain certain information from this (driver) level so that I can make use of such information at the network-layer. Now, I wish to make sure that whatever I pass on to the network-layer is correct. For this purpose, I intend to let the driver running at the kernel-level print some values onto the stdout. However, as you know the stdio.h and hence fprintf/printf cannot be used at the kernel level for me to print some run-time values. Hence, can somebody please let me have an idea as to how this can be performed.

Thanks in advance for taking your invaluable time to answer my question.

Best Regards,

Siva
 
Old 11-13-2006, 07:56 PM   #2
Connor.Xu
LQ Newbie
 
Registered: Nov 2006
Posts: 10

Rep: Reputation: 0
try the function printk.
 
Old 11-14-2006, 03:15 AM   #3
Siva4Linux
Member
 
Registered: Sep 2006
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Does anybody have an idea as to what is the equivalent printk() for the following printf():

printf("Signal Strength: %f, Noise: %f, SNR = %f \n", signal, noise, (signal/noise));

Thanks in advance
 
Old 11-15-2006, 07:36 PM   #4
Connor.Xu
LQ Newbie
 
Registered: Nov 2006
Posts: 10

Rep: Reputation: 0
You can view the implementing printk in the kernel tree. the file is kernel/printk.c.
 
Old 11-16-2006, 11:01 AM   #5
Siva4Linux
Member
 
Registered: Sep 2006
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Thanks, I am wondering whether there exists any debugging tool like
gdb/ddd for kernel-level hacking. Can I still use gdb/ddd ??? Please
shed some light.

Thanks and Best Regards,

Siva
 
Old 11-16-2006, 11:02 PM   #6
Connor.Xu
LQ Newbie
 
Registered: Nov 2006
Posts: 10

Rep: Reputation: 0
Hi,
I am not able to give you many details, since i have not done any practice for debuging kernel deeply.
I can only give you a reference in the following.
http://www-128.ibm.com/developerwork...bug/index.html

Good lucky.
 
Old 11-17-2006, 08:51 AM   #7
Siva4Linux
Member
 
Registered: Sep 2006
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Thanks for your link - it will be much helpful
 
Old 11-29-2006, 03:06 PM   #8
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Rep: Reputation: 30
if you use UML (user mode linux) http://user-mode-linux.sourceforge.net/ you can run a kernel as a user space process, and use gdb to debug. However since you are testing a wireless card driver, I'm not sure if that is goin to work.
Connor.Xu's link is a good start too.
 
Old 11-30-2006, 02:56 AM   #9
Siva4Linux
Member
 
Registered: Sep 2006
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Thanks everyone for taking the time to answer my question.
 
  


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
Difference between kernel - debugging and application debugging topworld Linux - Software 2 03-30-2006 12:50 AM
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM
Debugging Multithreaded Program villie Programming 2 08-17-2004 11:24 AM
Samba, GUI settings wrong, RedHat - W2K, smbclient runnig good, Nautils runnig bad samuel_burg Linux - Networking 1 06-23-2004 07:54 AM
motiff based program is not runnig on linux6.0 and above deepak Linux - General 0 09-21-2001 12:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

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

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