Hello everyone,

I have a simple question about the debugging of qemu.

I used the qemu-1.5.1, and added several .c and .h files related the block drivers. I want to debug my own implementations using gdb. but I have no idea how to do it.

I tried the following commands.

./configure --enable-debug --disable-werror --enable-kvm --prefix=/usr/local/kvm

make -j4

sudo make install

gdb sudo /usr/local/kvm/bin/qemu-system/x86_64 -s -enable-kvm -hda ubuntu.img -m 1024.

Could someone give me some guidance on how to use gdb in QEMU. I know the basic usage of gdb for simple .c file, but I really donot know how to use it in QEMU.

Thanks a lot in advance!

Yaodong