Re: debugging LKMs with GDB

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

 



On Sun, 7 Nov 2004 21:51:11 +0530, Shakthi Kannan <shakthimaan@xxxxxxxxx> wrote:

> On Sun, 7 Nov 2004 14:07:47 +0530, Himanshu Chauhan
> <meethimanshuchauhan@xxxxxxxxx> wrote:
> > As we can debug user space programs with GDB, how can we debug the
> > loadable kernel modules
> > with GDB.
> 
> I believe it can be done. You can probably even use ddd (Data Display
> Debugger). But, you may have to pass /proc/kcore to gdb.

You can, but not from the same box.

As was mentioned by Ajey Kulkarni in an earlier post, kgdb should help
here - it's a patch to the kernel which allows remote debugging from a
second host, whereas kdb (without the g) is a built-in debugger that
won't give you quite the level of debug.

Note that Linus does not bless kernel debuggers, but he has come
around to understanding a use for Dprobes. Perhaps it's worth using
probes as an alternative to a full debugger.

Jon.

--
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