gdb调试qemu本身
参考文献:http://www.360doc.com/content/16/0321/17/10671613_544087562.shtml
http://wiki.qemu.org/Documentation/Debugging
#新建文件command.gdb
gedit command.gdb
文件内容:
set breakpoint pending on
#file后为运行程序
file qemu/x86_64-softmmu/qemu-system-x86_64
handle SIGUSR2 noprint nostop
handle SIGUSR1 noprint nostop
break main_loop
break vl.c:3118
#run后为qemu-system-x86_64所接的命令
run --enable-kvm -m 2048 -hda ./test.img -cdrom ./ubuntu-14.04.5-desktop-amd64.iso
#run ./test1.img -m 1024 -net nic -monitor stdio -machine pc-i440fx-2.8 -rtc base=utc --enable-kvm -net tap,ifname=tap0,script=no -incoming tcp:0:6666
gdb -x command.gdb
感觉还可以用其他的调试:http://wiki.qemu.org/Testing