Cygwin, Qemu, and gdb
Posted: Wed Jul 10, 2013 4:11 pm
Has anyone been able to debug an OS running in qemu with gdb on a windows system? Here's the problem I'm having:
I have a simple kernel running in qemu. It's run with 'C:\cygwin\qemu\qemu.exe -s -S -L C:\cygwin\qemu -cdrom kernel.iso'. According to the wiki (the kernel debugging page) and qemu docs, adding the -s flag will run a gdb stub inside qemu allowing gdb remote debugging via port :1234.
After the kernel is running, in another Cygwin window, I type 'gdb' then 'target remote :1234'. After waiting a bit, I get ':1234 Connection timed out.'.
Any ideas? I've verified that the qemu process is indeed listening on 1234. I've search here and elsewhere and all I was able to come up with is this - http://www.cygwin.com/ml/cygwin/2007-04/msg00563.html - saying the gdb remote server may not be supported in Cygwin.
Version info:
windows 8
Cygwin 1.7.20-1
gdb 7.6.50-2 (Cygwin install)
qemu prebuilt windows binary (unable to find version)
Thanks!
I have a simple kernel running in qemu. It's run with 'C:\cygwin\qemu\qemu.exe -s -S -L C:\cygwin\qemu -cdrom kernel.iso'. According to the wiki (the kernel debugging page) and qemu docs, adding the -s flag will run a gdb stub inside qemu allowing gdb remote debugging via port :1234.
After the kernel is running, in another Cygwin window, I type 'gdb' then 'target remote :1234'. After waiting a bit, I get ':1234 Connection timed out.'.
Any ideas? I've verified that the qemu process is indeed listening on 1234. I've search here and elsewhere and all I was able to come up with is this - http://www.cygwin.com/ml/cygwin/2007-04/msg00563.html - saying the gdb remote server may not be supported in Cygwin.
Version info:
windows 8
Cygwin 1.7.20-1
gdb 7.6.50-2 (Cygwin install)
qemu prebuilt windows binary (unable to find version)
Thanks!