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 |
try the function printk.
|
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 |
You can view the implementing printk in the kernel tree. the file is kernel/printk.c.
|
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 |
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. |
Thanks for your link - it will be much helpful
|
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. |
Thanks everyone for taking the time to answer my question.
|
All times are GMT -5. The time now is 07:06 PM. |