How can I use gdb to debug qemu? I have been googling but couldn't find anything concrete.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I got an error with GDB 7.5 -> "Error accessing memory address"
It seems there is a problem with "Position Independet Executables" ...so use
./configure --enable-debug --disable-pie
and debug should work.
回答2:
Try the following:
./configure --enable-debug
By default qemu builds with "CFLAGS = -O2 -g" option which somehow doesn't allow debug symbols to be added. Using --enable-debug option will mean -O2 will not be added.