Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 00/11] Fix a few Cygwin/MinGW problems
Date: Mon, 25 May 2026 20:18:18 +0100	[thread overview]
Message-ID: <20260525191829.984105-1-pedro@palves.net> (raw)

Here's v2 of the series first posted as v1 at:
  https://inbox.sourceware.org/gdb-patches/20260522001626.393908-1-pedro@palves.net/T/

This started out as trying to make gdb.python/py-events.exp work on
Cygwin, which revealed a few other problems.  Some patches from v1
have been merged already, so fewer problems now.  OTOH, testing more I
saw some more problems, so...

- gdb.base/exitsignal.exp needs adjustment for MinGW as well.  A
  different adjustment, though.

- The inferior exit code / termination signal is mishandled on
  Windows.  Same problem as in v1, except the v1 solution was
  incomplete.

- gdb.python/py-events.exp needs a lot of adjustment for Cygwin and
  MinGW.

All fixed by this series.

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

New in v2:

 - Patches 1 through 3 in v1 merged and thus dropped from v2.
 - Now with gdb.base/exitsignal.exp fixes for MinGW.  Now passes
   cleanly there too.
 - Exit code patch more complete -- now handles attach case and
   non-cygwin inferior cases.  gdb.base/exitsignal.exp now covers
   those scenarios too.
 - Exit status logic refactor moved to its own patch.
 - gdb.python/py-events.exp adjustments split into three separate
   patches.

Pedro Alves (11):
  Adjust gdb.base/exitsignal.exp for MinGW, trigger fault
  Adjust gdb.base/exitsignal.exp for MinGW, second-chance SIGSEGV
  Adjust gdb.base/exitsignal.exp for MinGW, separate program names
  gdb.base/exitsignal.exp: Exit with non-zero
  gdb.base/exitsignal.exp: Test attaching too
  gdb/testsuite: Add mechanism to compile Windows native programs on
    Cygwin
  Windows gdb+gdbserver: Share exit status logic
  Windows gdb+gdbserver: Decode Cygwin ExitProcess codes
  Adjust gdb.python/py-events.exp for Cygwin/MinGW, thread IDs
  Adjust gdb.python/py-events.exp for Cygwin/MinGW, no fork
  Adjust gdb.python/py-events.exp for Cygwin/MinGW, "info proc" =>
    "inferior"

 gdb/nat/windows-nat.c                         | 177 ++++++++++++-
 gdb/nat/windows-nat.h                         |  35 +++
 gdb/testsuite/README                          |  22 ++
 .../gdb.base/coredump-filter-build-id.c       |  22 ++
 .../gdb.base/coredump-filter-build-id.exp     |   2 +-
 gdb/testsuite/gdb.base/exitsignal.exp         | 247 ++++++++++++------
 gdb/testsuite/gdb.base/normal.c               |  14 +-
 gdb/testsuite/gdb.base/segv.c                 |   9 +-
 gdb/testsuite/gdb.python/py-events.c          |   3 -
 gdb/testsuite/gdb.python/py-events.exp        |  83 +++---
 gdb/testsuite/lib/gdb.exp                     | 104 +++++++-
 gdb/windows-nat.c                             |  20 +-
 gdbserver/win32-low.cc                        |  21 +-
 13 files changed, 605 insertions(+), 154 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/coredump-filter-build-id.c


base-commit: 13f28e68cc751e4aac96f0ae700d7a708791006c
-- 
2.53.0


             reply	other threads:[~2026-05-25 19:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 19:18 Pedro Alves [this message]
2026-05-25 19:18 ` [PATCH v2 01/11] Adjust gdb.base/exitsignal.exp for MinGW, trigger fault Pedro Alves
2026-05-25 19:18 ` [PATCH v2 02/11] Adjust gdb.base/exitsignal.exp for MinGW, second-chance SIGSEGV Pedro Alves
2026-05-26 11:18   ` Eli Zaretskii
2026-05-27 12:56     ` Pedro Alves
2026-05-25 19:18 ` [PATCH v2 03/11] Adjust gdb.base/exitsignal.exp for MinGW, separate program names Pedro Alves
2026-05-27 21:59   ` Thiago Jung Bauermann
2026-06-12 14:00     ` Pedro Alves
2026-05-25 19:18 ` [PATCH v2 04/11] gdb.base/exitsignal.exp: Exit with non-zero Pedro Alves
2026-05-25 19:18 ` [PATCH v2 05/11] gdb.base/exitsignal.exp: Test attaching too Pedro Alves
2026-05-25 19:18 ` [PATCH v2 06/11] gdb/testsuite: Add mechanism to compile Windows native programs on Cygwin Pedro Alves
2026-05-25 19:18 ` [PATCH v2 07/11] Windows gdb+gdbserver: Share exit status logic Pedro Alves
2026-05-25 19:18 ` [PATCH v2 08/11] Windows gdb+gdbserver: Decode Cygwin ExitProcess codes Pedro Alves
2026-05-26 11:31   ` Eli Zaretskii
2026-05-27 13:58     ` Pedro Alves
2026-05-27 14:12       ` Eli Zaretskii
2026-05-27 22:00   ` Thiago Jung Bauermann
2026-05-25 19:18 ` [PATCH v2 09/11] Adjust gdb.python/py-events.exp for Cygwin/MinGW, thread IDs Pedro Alves
2026-05-25 19:18 ` [PATCH v2 10/11] Adjust gdb.python/py-events.exp for Cygwin/MinGW, no fork Pedro Alves
2026-05-25 19:18 ` [PATCH v2 11/11] Adjust gdb.python/py-events.exp for Cygwin/MinGW, "info proc" => "inferior" Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260525191829.984105-1-pedro@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox