Thread (1 message) 1 message, 1 author, 2012-04-03

How to debug a kernel thread?

From: Mulyadi Santosa <hidden>
Date: 2012-04-03 16:00:09

Hi :)

On Tue, Apr 3, 2012 at 17:37, Parmenides [off-list ref] wrote:
source tree. I compiled the kernel with kgdb and run it in qemu with
virtual serial port:

? ? qemu -kernel bzImage -initrd image.cpio.gz -append
"kgdboc=ttyS0,115200 kgdbwait" -serial tcp::1234,server

In another console, the gdb was given command:

? ? (gdb) target remote local:1234
? ? (gdb) continue

Then I pressed Ctrl+C to suspend the target, but got no reply. The gdb
got stuck and lost control to the target. As such, there is no
IIRC, years ago I did the same thing like yours, using kgdb and qemu.
What I forgot is how I hook into the remote kgdb stub.

Here's my suggestion: try other option outside tcp, perhaps UNIX
socket...or anything that's supported by gdb. And see if it makes any
difference.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help