按照博客http://blog.csdn.net/sunnybeike/article/details/6648815Qemu 调试内核,
qemu的启动方式如下,
qemu-system-x86_64 -kernel bzImage -hda linux-0.2.img -append "root=/dev/hda" -S
在弹出的qemu中,按住Ctrl+Alt+2,进入Qemu控制端,然后输入 gdbserver
然后,另起一个端口,输入
gdb vmlinux
出现如下错误:
Remote 'g' packet reply is too long: 28636081ffffffff6cca69010000000000fc090000000000685f5481fffffffff9774a81ffffffff36636081ffffffffb85f5481ffffffffa05f5481ffffffff00800001000000000000000000000000985f5481ffffffffd03101000000000000000000000000000000000000000000000000000000000000000000000000006a925d81ffffffff4600000010000000180000001800000018000000180000001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000