RE: kernel module debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Search for kdb or kgdb... with kdb you can set breakpoints, it is
included in recent kernel 2.6. Ive got best results using it with an
second computer connected via null modem, but it should also work with
only one system (the system to debug). But you will not get source level
debugging, asm is the way to go, but much better than nothing.

ciao

Am Di, den 29.06.2004 schrieb Dhiman, Gaurav um 8:50:
> Breakpoints can not be defined in kernel code, as kernel does not run in
> control of any debugger.
> When we run our application in debug mode, our application process runs
> under the control of that debugger using ptrace system call. Debugger
> becomes the parent of our application process so it can control it, run
> it, stop it etc using ptrace system call.
> 
> For debugging the kernel we need to have different approach, do read
> Rubini's book on Linux Device Driver, he has explained the debugging
> very well in chapter 4 of it. We can use any of those mechanisms, like
> using /proc file system or using printk, or ioctl etc.
> 
> Thanks & Regards,
> Gaurav Dhiman
> 
> 
> -----Original Message-----
> From: kernelnewbies-bounce@nl.linux.org
> [mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Potluri Suresh
> Sent: Tuesday, June 29, 2004 12:12 PM
> To: kernelnewbies@nl.linux.org
> Subject: kernel module debugging
> 
> 
> Hi
>      i want to debug kernel module. i want to put a break point in 
> kernel modules while debugging.
>      could any one help me. how to do.
> 
> Thanks and Regards
> p suresh.
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux