Compilation error from CVS while turning off optimization
hi,
I am still trying to debug qemu with gdb so I would like to turn off the optimization. But the build failed. I put the build output in this attachment, please check. I really appreciate if you can share the way you used to debug qemu.
Thanks,
Neo
Signature · 2 lines
I would remember that if researchers were not ambitious probably today we haven't the technology we are using!
Quoted 7 lines · Neo Jia
hi,
I am still trying to debug qemu with gdb so I would like to turn off the optimization. But the build failed. I put the build output in this attachment, please check. I really appreciate if you can share the way you used to debug qemu.
I didn't find any build error on that log, but the -O2 flag is still there. I believe it'd be useful if you post your build configuration or the changes you made.
I'm trying to make it work with gdb too. Tried the guide on qemu-win site [1] but without success. GDB keeps showing "no symbols found".
[1] http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html
Signature · 3 lines
Lauro ("orduz" on Freenode)
CIn/UFPE
http://lauro.wordpress.comRe: [Qemu-devel] Compilation error from CVS while turning offoptimization
Quoted 6 lines · Lauro Moura
Quoted 5 lines · Neo Jia
hi,
I am still trying to debug qemu with gdb so I would like to turn off the optimization. But the build failed. I put the build output in this attachment, please check. I really appreciate if you can share the way
you
Quoted 12 lines
Quoted 2 lines
used to debug qemu.
I didn't find any build error on that log, but the -O2 flag is still there. I believe it'd be useful if you post your build configuration or the changes you made.
I'm trying to make it work with gdb too. Tried the guide on qemu-win site [1] but without success. GDB keeps showing "no symbols found".
[1] http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html
I don't know why "no symbols found".
This patch turns off optimization for current CVS and to disable SIGUSR2 and AIO use SIGALRM. Because gdb can't ignore SIGUSR2 signal. It also disable timer interrupt because it is not good for debugging. After AIO is introduced, SIGALRM and SIGUSR2 are used on Linux host. They have effect on gdb.
http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20061108-debug-on-linux.patch
On Windows host, these signal handling are not used so that debugging is easier.
http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20061108-debug-on-windows.patch
This is my debugging method on Linux host.
(1)Apply patch to current CVS and make.
$ cvs -z3 -d:pserver:[email protected]:/sources/qemu co qemu
$ cd qemu qemu$ patch -p0 <../qemu-20061108-debug-on-linux.patch qemu$ ./configure --target-list=i386-softmmu --cc=gcc32 qemu$ make
(2) Change directory to i386-softmmu and edit .gdbinit file. qemu$ cd i386-softmmu
i386-softmmu$ vi .gdbinit
This is .gdbinit file.
----------------------
file qemu
set args -L ../pc-bios -hda ../../linux.img
b main
define hook-stop
handle SIGALRM nopass
end
define hook-run
handle SIGALRM pass
end
defilen hook-continue
handle SIGALRM pass
end
run
-----------------
AIO used SIGALRM in the patch and set gdb ingore it.
(3) Start gdb.
i386-softmmu$ gdb
Then the program stops at main routine.
Regards,
Kazu