When cross-debugging on a target that uses a debugging stub or external simulator that speaks GDB remote protocol, we'd like to have Eclipse automatically launch the stub, as well as GDB, when the user clicks on the "Debug" button. Unfortunately, there's a race condition here: GDB may try to open the TCP port to the stub before the stub has finished its own initialization and started listening for a connection, which leaves GDB with a "connection refused" error and the stub stuck waiting for a connection that never arrives. The attached patch addresses this by adding an auto-retry feature to "target remote" TCP connections, and extending the existing timeout logic to cover polling for retry attempts as well as waiting for connections that are merely slow. I've done a fair amount of manual testing with this in both Linux and Mingw32 host builds and it seems to DTRT reliably. Does this look OK? I'm not really wedded to the details here, if others want to argue for different command names, different timeout handling, etc. -Sandra