From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gW5dBO2gFGqyHxoAWB0awg (envelope-from ) for ; Mon, 25 May 2026 15:20:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 0A9101E0A6; Mon, 25 May 2026 15:20:13 -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 476911E024 for ; Mon, 25 May 2026 15:20:12 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C011D4BA799E for ; Mon, 25 May 2026 19:20:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C011D4BA799E Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by sourceware.org (Postfix) with ESMTPS id 708334BA7997 for ; Mon, 25 May 2026 19:18:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 708334BA7997 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 708334BA7997 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779736738; cv=none; b=p9R8X/AuAjE3D92ySfXKlPtT6Vtashr6vOqYG2wCIiN7hrSA+vBmzgSAD5maRhA5Qhdj1/dtSrmt7Fk21fTWA+iFLyGS2OsVTu6D8F3YFX+N+KbNStDVHEcnrOK2mLhwNo1JE6IqIB+AGJ5AoqLfAZvhnA9cUCRGds0SN0Guf7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779736738; c=relaxed/simple; bh=qItVgjDNb7fHvT5bI9DqNmUV9cX/dByQOR0ztCaWGgc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=O7IyNEIUf/rx2MSDZIWb0gapLteamJHsYueQsm5ssjjov8vVtnAwBapyNP3BJhDYXsUaE6YqYYfsfLIvLLGvgx4IP4DTcjgABvq3j9ECqKzZPKJFlDrQvINk9HL6bl038lWBhElmIKk+sizRSPop5a2eMCaoaYHAnBIo2+g8tDc= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 708334BA7997 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-45e9f4a3510so2538221f8f.1 for ; Mon, 25 May 2026 12:18:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779736737; x=1780341537; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=eFWtp8UhFMfKPcqq396Z8hy6sxXaTUW2mjPOLFVaWQk=; b=ZHixrajQDLAsciUVZObZBUGuxqhHRZ15bT2q6B2gex5bNt2NW5ITyzb2IWNUDanDjD uy3zb9O4lF0iLIqUAD7rpIyMjIquZa4tCOTp/ygJmC8JoL6CF9HIJ4NEMxqlgUrBDo8G w7qggifae+JV5Wnc7u2I5l1kb+IQhzA3S+dBdPFeSl9y53oVUPQcw725r7y2NKFwdnsm pXXHyOxciotwAXw+IF/+DyZebti4ch8Pu52kKhvXr5OngircagblO3Cg44FkjKvtIuDr hTU+NTVjVk4nwJ2GdTPOrpnHT9o5m3YK4e0KBcVqaWdW0J+H5nNH/0mzjBAA+K2MznE7 FmvQ== X-Gm-Message-State: AOJu0YworONXG7/E5WVfxIWOc5W8VblO6HkUg84e0gmLmDU3naU9G0Ph s9PnCSumn5CiFtvxsCFSO3lLL/zrjk2Z38RBeNPHyZOGa9/fqpQxg/FMFyvOZA== X-Gm-Gg: Acq92OGeeVhqzDhDN/xGn9qlJx9nN1kz+YoN1jGvX3x1dZK5MKwa+T8wnwzZFfxbNtl asAlEPAw3hSxL0kvMx64otNAsrbqdijiUE9Jgof3fJf2gK1do/OtjozXM/8BfGcIbJCvolnrBp9 qdibZA3f/G01PC9sWz0DsHDlWXe1QSydMZ7sM9FYpYUgpUSP0HqQxqsnfFjKPCIDak8FpkMx82i LBzyKVHyfdpYuaS/wrGeh1pknwfMd1W+/V6a8FTwmEyBL3hk+avE8hKieKJAj38fRArD3Nqz+zM UC9qpg38PXpi4qBIpAkwCv0B/ubt9uBSdiiutXq3FGKlQvnXCxWf9OEnb6W0rn21IZ48//sInik 9TLD7IxETxjf3qvU6Vb+LmnX6Kdmh7DlRMeJbm49Hd8c7jg8Z3aHgLoCx+cvGWBNZ+OEvty1+2l 54M80bfngsMt1XkYG9Kbu2/w== X-Received: by 2002:a05:6000:4a1e:b0:44a:fa76:5193 with SMTP id ffacd0b85a97d-45eb36881a0mr23986844f8f.12.1779736737298; Mon, 25 May 2026 12:18:57 -0700 (PDT) Received: from localhost ([2001:8a0:fae3:2600:dc16:ec0f:632c:5ba7]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-45eb6d4ca0dsm28969998f8f.18.2026.05.25.12.18.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2026 12:18:57 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 11/11] Adjust gdb.python/py-events.exp for Cygwin/MinGW, "info proc" => "inferior" Date: Mon, 25 May 2026 20:18:29 +0100 Message-ID: <20260525191829.984105-12-pedro@palves.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260525191829.984105-1-pedro@palves.net> References: <20260525191829.984105-1-pedro@palves.net> 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 The testcase is using "info proc" to extract the inferior's process ID. But "info proc" does not exist on all targets, including Windows. Switch to using the get_inferior_pid routine from lib/gdb.exp, which uses "inferior" instead. With this fixed, the testcase passes cleanly on Cygwin. I haven't tested on MinGW (I'm not set up for Python testing there currently), but at least (since the previous patches) the test should be able to compile & run there now. Also tested on x86_64-unknown-linux-gnu. Change-Id: If6ff482ceb011d9afe5ed40ef7e4e2f2cad8cae8 commit-id: 172fe262 --- gdb/testsuite/gdb.python/py-events.exp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp index a34a423c014..35681cb178e 100644 --- a/gdb/testsuite/gdb.python/py-events.exp +++ b/gdb/testsuite/gdb.python/py-events.exp @@ -203,19 +203,7 @@ gdb_test_multiple "continue" $test { gdb_test_no_output "delete $second_breakpoint" -#test exited event. -proc get_process_id {test} { - global gdb_prompt - gdb_test_multiple "info proc" $test { - -re "process (\\d+).*$gdb_prompt $" { - set process_id $expect_out(1,string) - pass $gdb_test_name - } - } - return ${process_id} -} - -set process_id [get_process_id "get inferior process id"] +set process_id [get_inferior_pid] gdb_test "continue" ".*event type: continue.* .*event type: exit.* .*exit code: 12.* -- 2.53.0