From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AUMJDqagFGqyHxoAWB0awg (envelope-from ) for ; Mon, 25 May 2026 15:19:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 32ADD1E0A3; Mon, 25 May 2026 15:19:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 223821E091 for ; Mon, 25 May 2026 15:19:00 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0C004BABF17 for ; Mon, 25 May 2026 19:18:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0C004BABF17 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id 5BACE4BA2E37 for ; Mon, 25 May 2026 19:18:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BACE4BA2E37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5BACE4BA2E37 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779736714; cv=none; b=s4Wi0CBbYAbO9N9ygiNW/nRIwF4XFIOWP51XAhE/ZAP+gsY9Kms0qpIWxCuKBtpaAzkvhheVCMfYJuP9r4dUJzDlqYMdW/jWAYaNWnTHcEujIYjVNAQ4tJZHt8Z8NyZd1a5+aCn81SAEJ0M0yOcnnm4HV8zYSHUt9qCbcCHyKNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779736714; c=relaxed/simple; bh=lABH/24h3WREkl40t5YV2kuW+E8fJo/1uNXFxPBF0xo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LM18vDe5iy6rFDZbwc2zOXMMkvOuqYNXjSLlvKu/ERkMsR7Z+vzAjYM0kSxjjsLReNoSY59bJWJEteUpxdDMZLiN+iFvUZkdvlzO+Pkv/7MO6dJ7PcnrEQlebqScHDcz8zQmNBxkbwVoFsUIQEpIoXUnLke9xu9g73h9zgegyWY= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BACE4BA2E37 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso124844255e9.1 for ; Mon, 25 May 2026 12:18:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779736713; x=1780341513; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8riRKbymE0r31mZNmY3XJ1AwC09dblOmrUVHK8tJsfM=; b=gPS749u0uNsMa4c4cW3JTFm9EgpGuZcCjLdEQ5nl38YFvvQAEj0yK7NMA6n6xQzyfd 4Ss6MbpHw+YfNmc5NyDBst20lb8dD4WlOvtVcrQFmvw/ZOP70VBf0ODStjylLXaUXwXq 7xemmvwZ7HLaYDqq2SmV7BwW57xfgvtHNCsrJDklT25VF3wnKrlVIxNOdkDDA9pu4g9c CeQk34hzZMiSdE529qHU4MPzEKa+CID3Q3HiPS3mMrEhEUkn5/pmmgAN/zmIdFrZyens YL6RSLAKarsX2UGWoWBmxlgfubsrO39T3MUPJ7iGHu8Yd7KyQtLHGWoYl2MXhZfA98YT 6zBg== X-Gm-Message-State: AOJu0YyHb7KgKDTNv3MPalbxlbjKOpoumPgt65VN+oFBKGv05O50yIOK lAZSuais31/Ne5vfhmCY3wzIrF757cHiAaGo1RxQF80blUKZBzK7/+F+ZBUIcQ== X-Gm-Gg: Acq92OErK3HVhndtdt16Ct+bvGFZ6w4qGpFqTsvUFfG+SnZadn8eR43Tac4B8/ac6jF bV4QaNnpnZ2I31P+iOHEgRg1CW/fIwS3j8tB+vlm62lHbHA04HLa+yYqhN+JR6W8SdfZ8evLuqq bxhiLS86F1Qbf9nk2ZntV9gAuxe+sIce0w/LkZnzlLqUa0qtorwMw+PSG7wali1UghlbS1y5TMM RkWQZAA4biaQH1qNQkgRI93Ms8Uo9DIZUVotWtwTZMJo0GO04PcBRsi9jkrND4L54R2s4XXjvUW K25KnRXUzsLz5NPN9RHKvCx+wqfYZEQyJL3D0H6xuoPOqwzik9Zs7y4EAOvYh7dz1QW6lBW104e 88tvWMzsl6al2g+2JFWD6CNdMuOxVKSemIbH3RdrauQt2WmrJ9X8Omq8VrkcZgNMSbCY8imzNxq Caqkv60BN004EsZNIIsJrtB/tyPrjcoBtY X-Received: by 2002:a05:600c:8b23:b0:48f:d5b2:7c1a with SMTP id 5b1f17b1804b1-490425aa7a4mr269473625e9.13.1779736713017; Mon, 25 May 2026 12:18:33 -0700 (PDT) Received: from localhost ([2001:8a0:fae3:2600:dc16:ec0f:632c:5ba7]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4904527f7f7sm398695545e9.7.2026.05.25.12.18.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2026 12:18:32 -0700 (PDT) From: Pedro Alves 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 Message-ID: <20260525191829.984105-1-pedro@palves.net> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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