Hey guys, I can't seem to figure out how to debug a COM32 app with GDB under qemu. I start "qemu -s" and then "gdb hello.elf ; target remote:1234" but can't set any breakpoints that work. I"m using syslinux4 (pathbased from the repo). Can anyone verify that they can use qemu+com32+gdb with something as simple as com32/samples/hello.c32 ? Also, is it possible to use com32/gdbstub with qemu? (How would you connect to qemu's serial port)? Thanks a lot for your time. don
On Wed, May 19, 2010 at 11:10 AM, Don Hiatt <donhiatt at gmail.com> wrote:> ?Also, is it possible to use com32/gdbstub with qemu? (How would you > connect to qemu's > serial port)?Answering my own question, "qemu -s -serial pty" creates a pty that gdb can connect to via "target remote /dev/pts/9" (or whatever qemu displays as the "char device redirected to /dev/pts/9"). However, running "/boot/gdbstub /boot/hello.c32" I can connect with gdb but breakpoints don't seem to work. Thanks.
On 05/19/2010 11:10 AM, Don Hiatt wrote:> Hey guys, > > I can't seem to figure out how to debug a COM32 app with GDB under qemu. > I start "qemu -s" and then "gdb hello.elf ; target remote:1234" but > can't set any breakpoints > that work. I"m using syslinux4 (pathbased from the repo). > > Can anyone verify that they can use qemu+com32+gdb with something as simple as > com32/samples/hello.c32 ? > > Also, is it possible to use com32/gdbstub with qemu? (How would you > connect to qemu's > serial port)? >You need to tell gdb that the module is loaded at an offset: gdb core/extlinux.elf target remote localhost:1234 add-symbol-file com32/samples/hello.elf -s free_high_memory -hpa