This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Gdb target for kdb
- To: Stan Shebs <shebs at cygnus dot com>
- Subject: Re: Gdb target for kdb
- From: Andi Kleen <ak at muc dot de>
- Date: 01 Dec 1999 18:03:11 +0100
- cc: gdb at sourceware dot cygnus dot com
- References: <199912010302.TAA17555@andros.cygnus.com>
In article <199912010302.TAA17555@andros.cygnus.com>,
Stan Shebs <shebs@cygnus.com> writes:
> Date: Tue, 23 Nov 1999 17:20:29 +0100
> From: Bernard Mainguenaud <mainguen@gabin.frcl.bull.fr>
> We intend to use gdb to debug a running Linux kernel connected
> to another Linux box via an asynchronous line. For this purpose,
> we are considering developping a new gdb target that interfaces
> with kdb. Has anyone ever tried to develop such a kdb target
> before ?
> Not to my knowledge. As Jim Blandy, you could pretend it's like a ROM
> monitor and do a backend that way. However, it would be better to add
> a "GDB stub", which is a target-side implementation of the standard GDB
> protocol. Several of the Linux ports, such as for Sparc and Mips,
> already have stubs built in; look for gdb_* in the arch-dependent
> parts of the kernel. The x86 port does not include a stub, at least
> the last time I looked - supposedly Linus doesn't approve of debugging
> stubs, but I haven't heard him actually say that, and it may just be
> that no one has actually made the effort to get a stub in. If so,
> then this would be your chance to benefit other kernel developers...
The available stubs are all inferior to the SGI kdb, which e.g. has proper
SMP support, support for switching kernel threads and other useful stuff that
does not work with the rather primitive standard gdb stub. It is a bit more
bloated though because it includes a disassembler and a symbol table, but
it seems to be the most popular x86 linux kernel debugger now.
I plan to do a gdb backend for it when I have time.
-Andi