[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] How to debug the linux kernel running in qemu?
From: |
Parmenides |
Subject: |
[Qemu-discuss] How to debug the linux kernel running in qemu? |
Date: |
Thu, 29 Mar 2012 09:28:28 +0800 |
Hi all,
I need debug the linux kernel in qemu and have installed the qemu
in CenterOS then started it with the following command line:
qemu -kernel arch/x86/boot/bzImage -initrd
~/image.cpio.gz -net nic -net tap,ifname=tap0 -vnc :1 -gdb tcp::4321
Then, I started the gdb with:
gdb vmlinux
(gdb) target remote localhost::4321
and can set breakpoints, interrupt the kerenl, execute kerenl
statements step by step as well as other debugging.
However, when I tried to debug a kernel thread started by a loadable
kernel module, something got confusion. Although I have set a
breakpoint at one line in the thread function's loop statement and can
see the output of the thread repeatedly, the breakpoint does not
triggered at all. I have checked the virtaul address of .the kernel
loadable module's text section which are provided when adding a symbol
table for gdb, and ensure that there are no mistakes. So, I wonder
whether the gdb stub of qemu can not support kernel thread. If so, is
there any way to deal with it readily? Thx.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-discuss] How to debug the linux kernel running in qemu?,
Parmenides <=