[0/5] Fix a few Cygwin/MinGW problems

Message ID 20260522001626.393908-1-pedro@palves.net
Headers
Series Fix a few Cygwin/MinGW problems |

Message

Pedro Alves May 22, 2026, 12:16 a.m. UTC
  I tried to make gdb.python/py-events.exp work on Cygwin, which, as
usual, revealed a few other problems...

- "set cwd ..." does not work properly on Cygwin, the program does not
  even start up with that -- affects both GDB and GDBserver.
- gdb.base/exitsignal.exp needs adjustment for Cygwin.
- The inferior exit code / termination signal is mishandled on Windows.
- gdb.python/py-events.exp needs a lot of adjustment for Cygwin and MinGW.

gdb.base/exitsignal.exp and gdb.python/py-events.exp both tested on
x86_64-unknown-linux-gnu and on Cygwin.

All fixed by this series.

Pedro Alves (5):
  Fix "set cwd ..." on Cygwin, part 1
  Fix "set cwd ..." on Cygwin, part 2
  Adjust gdb.base/exitsignal.exp for Cygwin
  Fix exit/signal code on Cygwin
  Adjust gdb.python/py-events.exp for Cygwin/MinGW

 gdb/nat/windows-nat.c                  | 42 +++++++++++++++
 gdb/nat/windows-nat.h                  |  4 ++
 gdb/testsuite/gdb.base/exitsignal.exp  |  8 ++-
 gdb/testsuite/gdb.python/py-events.c   |  3 --
 gdb/testsuite/gdb.python/py-events.exp | 73 ++++++++++++++------------
 gdb/windows-nat.c                      | 28 ++++------
 gdbserver/win32-low.cc                 | 43 +++++++++------
 7 files changed, 130 insertions(+), 71 deletions(-)


base-commit: f6c1ca239d932db39a6f19d9bd343f4f4fddba76