[0/3] "run" and "attach" failure handling problems

Message ID 20240212200153.882582-1-pedro@palves.net
Headers
Series "run" and "attach" failure handling problems |

Message

Pedro Alves Feb. 12, 2024, 8:01 p.m. UTC
  While looking at gdb.base/attach.exp testsuite results on native
Cygwin, I noticed that "attach PID" or "run" would hang if the
previous command was an "attach" or "run" command that failed.

After fixing that on the Windows backend, I wrote a testcase for the
"run" scenario, and that revealed that GDBserver (all ports) also did
not handle that well.

This series thus fixes GDBserver, adds said testcase, and then finally
fixes native Cygwin.

Pedro Alves (3):
  Fix "run" failure with GDBserver
  Improve vRun error reporting
  Windows: Fix run/attach hang after bad run/attach

 gdb/remote.c                              | 23 +++++++-
 gdb/testsuite/gdb.base/run-fail-twice.exp | 67 +++++++++++++++++++++++
 gdb/windows-nat.c                         | 15 +++--
 gdbserver/server.cc                       | 10 +++-
 4 files changed, 106 insertions(+), 9 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/run-fail-twice.exp


base-commit: cda750802aef3beea582f0f3cad824be491abb4d