kdb
[Top] [All Lists]

Re: Source level debugging with kdb

To: Keith Owens <kaos@xxxxxxxxxxxxxxxxx>
Subject: Re: Source level debugging with kdb
From: "Andi Kleen" <ak@xxxxxxx>
Date: Thu, 21 Sep 2000 12:12:24 +0200
Cc: Scott Lurndal <slurn@xxxxxxxxxxx>, andrew.grover@xxxxxxxxx (Grover Andrew), kdb@xxxxxxxxxxx
In-reply-to: <968.969525925@xxxxxxxxxxxx>; from kaos@xxxxxxxxxxxxxxxxx on Thu, Sep 21, 2000 at 07:45:25PM +1100
References: <200009210804.BAA04505@xxxxxxxxxxxxxxxxxxxxxxxxx> <968.969525925@xxxxxxxxxxxx>
Sender: owner-kdb@xxxxxxxxxxx
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@xxxxxxxxxxx> 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

<Prev in Thread] Current Thread [Next in Thread>