I’m using GDB and OpenOCD to debug a simple program on my STM32F4DISCOVERY board on Windows. This works fine when starting OpenOCD separately, and using TCP/IP to connect to it, with something like this:
target remote localhost:3333
When I’m done, I can shut down GDB using quit as normal. I would like, however, to use GDB in “remote pipe” mode, instead of needing to start and stop OpenOCD manually. This seems like a somewhat ideal configuration to me. When I do this, however, I cannot exit GDB, as it hangs when I attempt to exit.
The OpenOCD log file shows that the GDB connection was dropped:
Info : dropped ‘gdb’ connection
But GDB never exits:
(gdb) quit
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) y
Detaching from program: yagarto_sample.elf, Remote target
Ending remote debugging.
The disconnect command similarly hangs, never returing. Not even Ctrl-C will wake up GDB. Am I doing something wrong? Is there some sort of configuration change I can make?
I’ll give building it a shot, but it could be a bit, due to the holiday. Is it simpler to cross-compile from Linux or build using Cygwin? I’m not a particular fan of Cygwin…