LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Runnig a program in debugging mode at Kernel level (https://www.linuxquestions.org/questions/linux-wireless-networking-41/runnig-a-program-in-debugging-mode-at-kernel-level-501097/)

Siva4Linux 11-13-2006 03:28 AM

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

Connor.Xu 11-13-2006 07:56 PM

try the function printk.

Siva4Linux 11-14-2006 03:15 AM

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

Connor.Xu 11-15-2006 07:36 PM

You can view the implementing printk in the kernel tree. the file is kernel/printk.c.

Siva4Linux 11-16-2006 11:01 AM

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

Connor.Xu 11-16-2006 11:02 PM

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.

Siva4Linux 11-17-2006 08:51 AM

Thanks for your link - it will be much helpful

djgerbavore 11-29-2006 03:06 PM

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.

Siva4Linux 11-30-2006 02:56 AM

Thanks everyone for taking the time to answer my question.


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