Source level debugging with kdb

Andi Kleen ak at suse.de
Thu Sep 21 03:12:24 PDT 2000


On Thu, Sep 21, 2000 at 07:45:25PM +1100, Keith Owens wrote:
> On Thu, 21 Sep 2000 01:04:02 -0700 (PDT), 
> Scott Lurndal <slurn at nanobiz.com> wrote:
> >You could preload the information from vmlinux
> >either at run-time prior to the first entry
> >of kdb (via insmod, for example)  or at boot time
> >by reading the appropriate parts of vmlinux into
> >allocated memory.   If you have the memory to spare...
> 
> But then you have to teach gdb to read from memory instead of from a
> file.  The whole problem is the design of gdb, it runs as a normal
> application and issues system calls to do I/O and talk to the user.
> System calls require kernel support but kdb has stopped the kernel.
> Don't even think about embedding gdb into the kernel, shudder.

Actually there is some old patch that allows local kernel debugging
with gdb via a gdb stub that works via a character device (it used to be 
in ikd), but of course it is a very very risky thing because you can easily 
deadlock yourself.

-Andi



More information about the kdb mailing list