In a continuing effort to get kgdb merged into the mainline 2.6 Linux kernel [story], Amit Kale announced a feature freeze on his core-lite and i386-lite kgdb patches. At this point, he intends to only perform bug-fixes and code cleanup to these patches until they are merged, aiming for 2.6 inclusion by the end of this month. This first merge will only add kgdb support with a minimal featureset to the i386 architecture, allowing remote kernel debugging through a serial connection.
Recently added to the patches was some kgdb documentation, which begins:
"kgdb is a source level debugger for [the] linux kernel. It is used along with gdb to debug a linux kernel. Kernel developers can debug a kernel similar to application programs with use of kgdb. It makes it possible to place breakpoints in kernel code, step through the code and observe variables."
It was recently pointed out that the stock 2.6.2 kernel contains in-kernel support for kgdb for some architectures, but not i386. 2.6 maintainer Andrew Morton replied, "lots of architectures have had in-kernel kgdb support for a long time. Just none of the three which I use :(" As to getting kgdb for i386 into the kernel, he explained some reluctance:
"I wouldn't support inclusion of i386 kgdb until it has had a lot of cleanup, possible de-featuritisification and some thought has been applied to splitting it into arch and generic bits. It's quite a lot of work."
It was quickly pointed out that Amit Kale has done much of this work with his version of kgdb, available here. Andrew replied, "Look, there's a lot of interest in this and I of course am fully supportive. If someone could send me Amit's patchset when they think I should test it, I could then talk about it more usefully." Read on for much of the lkml thread, including specifics reasons why and why not to include kgdb in the stock 2.6 kernel.