From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7QOECtuhD2qysw0AWB0awg (envelope-from ) for ; Thu, 21 May 2026 20:22:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 177D21E024; Thu, 21 May 2026 20:22:51 -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 659351E024 for ; Thu, 21 May 2026 20:22:50 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED3DC48F665B for ; Fri, 22 May 2026 00:22:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED3DC48F665B Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by sourceware.org (Postfix) with ESMTPS id 3075648F66DA for ; Fri, 22 May 2026 00:22:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3075648F66DA 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 3075648F66DA Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779409345; cv=none; b=NqhG44x6LGOnPKmLB45CIoLvDb6X7Kxte7ippk+f2xiBrcmsO1I5xZAjJFnWSwMG1cPKY3dV9Kk/gNiCvNqLY/VKnbx3W2U0MVqhYtkSMPdnLHcQAwwEZFbSXObGVuqbFxJR41CluHh+fAaDKzGsBLvqmWNqgZp1iCXP3bQrbEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779409345; c=relaxed/simple; bh=2b8QhwTau0QSCqzJcCykbmkA/BbFLfGFt/KwL+Ummrk=; h=Message-ID:Date:MIME-Version:From:Subject:To; b=d49hfygrfebIi22g+JeVA7ayP/Fx7StIE0uEdUBJ3l7GrcJ67JWT/10C/neEj6yHV6Yxff4Gu8BR0XS2FDhZKNUKnHMbAFYjoTdoKgOS+XVt6sQeZH3e9o8JlC9jY0NhHETPc0jg7XXd2FY5XF7pzaXw1RDoaaEasdu7rtvgkMA= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3075648F66DA Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-49042aeeb75so3108485e9.1 for ; Thu, 21 May 2026 17:22:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779409344; x=1780014144; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ud1tr95trwzkCkCH30tSYaC10cReIuHrEnKAaDTWfuw=; b=fLalXXGj2T60f9pNe+8h0k+cOxUjTkqhVmZ82gPUx1nwtBLmMUGHXs4RAwhfsnHh+r pEOPItsBjhDIOrrLXMwz9s+GwNAzzU9Jwf7xbx/EFV81pQ9JVZwot7qGvHLH4sSeBR4s mCacpBFPSyo/5xAuZoLx3SdgS1Q3tN1LA+OWIhcswjJR5VOTTt1+7ukSVlWNvTRhWjoF Tgu+XpR/VdQxuhLAiZJMJQEmVFelrfbSLqD+lgUQ56HwDK/zLSiHOVZhaGpJEyZcaXFC h6bX32lptzTkb6F3VpDCneBm5yYsmjpu1+LXtQQXPsMklv6SUJZYjv+ctPWB3j7jFgDn jICA== X-Gm-Message-State: AOJu0YyYwEUS+zBVW2agadNYinB4fAq5v7z3UiV9hpgPLUK5UDLInEyx uJlZP13cwd6/iyPae4iPrmukjMjrzYnjDTFh02va0eI4UNvH3fmrdO37izBpIg== X-Gm-Gg: Acq92OH1YXxpfkrbaUuMHHumGYdDIaUdRMnA86MNZCGS9ihNQU7oLDaSNPrcLaVuCdU ljP8yKXItfdUD88A6kRNc+O4CyQZrbNuje27QmKtT9N4sOtF3BlUTNxmYqTQ8xFEJ254ljS1nIC RriDkxo+XeJjEQ/nolMcrIn0TVP2dvfqrQu967BkDT6vSX4+nevSUl8C+kPSDx0E74g/aFoJy1T P9bNPYY9e3a0YKNx7eN9JdGFPwr5Al2WaKrSda4x/uvxnxl/ACkWxvZ2fRwK05HRbfm9nNh/vsa GU9SY8HUtbyKki24McTAwNKNAF4BH+qNoVZscN6o6ibTvfxc87O2W5TNpXY+Reyh/X9WEH0oFjn DWsnXuD4lonvJ7V0tTbQDkvRPjQNziWngXbPfCmhDTLBX42rUmrq5hkMG+A58HO3iDRaLIWHUF1 CEkXb/296DFSi283uNUEDS/4tmX/22LNmGd+Y5rkCM9qUh02H72u9PweTYyCvI5aAUxw== X-Received: by 2002:a05:600c:5298:b0:48f:e230:2a26 with SMTP id 5b1f17b1804b1-490428e16bamr12812355e9.33.1779409344054; Thu, 21 May 2026 17:22:24 -0700 (PDT) Received: from ?IPV6:2001:8a0:fae3:2600:cb04:347e:aaad:ca08? ([2001:8a0:fae3:2600:cb04:347e:aaad:ca08]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4904333146bsm5255485e9.0.2026.05.21.17.22.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 17:22:23 -0700 (PDT) Message-ID: <2ffed18e-6960-4835-8238-b8e9ca0ba461@palves.net> Date: Fri, 22 May 2026 01:22:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Pedro Alves Subject: Re: [PATCH v3 00/11] Windows non-stop mode To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260429201507.480870-1-pedro@palves.net> <873401oi7w.fsf@tromey.com> <8a20e6ce-0f71-4a00-b62f-14cfc2ea32d5@palves.net> Content-Language: en-US In-Reply-To: <8a20e6ce-0f71-4a00-b62f-14cfc2ea32d5@palves.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Hi! On 2026-05-08 22:27, Pedro Alves wrote: > On 2026-05-08 19:43, Tom Tromey wrote: >> There's another test that adds some event listeners from Python like: >> >> gdb.events.stop.connect(signal_stop_handler) >> gdb.events.stop.connect(breakpoint_stop_handler) >> gdb.events.exited.connect(exit_handler) >> gdb.events.cont.connect(continue_handler) >> >> These just print what happens. The test started failing because what >> exactly happens has changed: >> >> --- Regression: K224-002__py-events:what_happened >> - Could not match >> event type: continue >> event type: stop >> event !! FAILS HERE -> type: stop >> stop reason: breakpoint >> breakpoint number: @NUMBER >> all threads stopped >> - Against input line >> event type: continue >> event type: continue >> event type: stop >> event type: stop >> stop reason: breakpoint >> breakpoint number: 2 >> all threads stopped >> >> That is, two stop events seem to be produced? >> > > I'm afraid I'm not able to parse the output above off hand. > >> According to the notes this test is a port of gdb.python/py-events.exp, >> though I am not sure if they have diverged. > I was looking at the output of gdb.python/py-events.exp on Linux, and I see two stop events there: Breakpoint 2, first () at /home/pedro/rocm/gdb/src/gdb/testsuite/gdb.python/py-events.c:30 30 for (i = 0; i < 2; i++) event type: stop event type: stop stop reason: breakpoint first breakpoint number: 2 breakpoint number: 2 breakpoint number: 3 all threads stopped (gdb) PASS: gdb.python/py-events.exp: continue Two stops seems to be what happens for every test in that testcase. I noticed that the .exp file matches with: # Test continue event and breakpoint stop event gdb_test "continue" ".*event type: continue.* .*event type: stop.* .*stop reason: breakpoint.* .*first breakpoint number: 2.* .*breakpoint number: 2.* .*breakpoint number: 3.* all threads stopped.*" So if gdb prints two stop events by mistake, the testcase will still pass. I went as further back as commit f1cc4f02cb558d513cb4575211dbbb690391618f (May 21 2023), and I saw the same there, though. Looking at gdb.python/-events.py, we have: def invoke(self, arg, from_tty): gdb.events.stop.connect(signal_stop_handler) gdb.events.stop.connect(breakpoint_stop_handler) So we register two callbacks for the same event, so it's really expected. With: diff --git i/gdb/testsuite/gdb.python/py-events.py w/gdb/testsuite/gdb.python/py-events.py index 2cb48e4eccf..a5ac083bfd4 100644 --- i/gdb/testsuite/gdb.python/py-events.py +++ w/gdb/testsuite/gdb.python/py-events.py @@ -20,7 +20,7 @@ import gdb def signal_stop_handler(event): if isinstance(event, gdb.StopEvent): - print("event type: stop") + print("event type: stop (1)") if isinstance(event, gdb.SignalEvent): print("stop reason: signal") print("stop signal: %s" % (event.stop_signal)) @@ -30,7 +30,7 @@ def signal_stop_handler(event): def breakpoint_stop_handler(event): if isinstance(event, gdb.StopEvent): - print("event type: stop") + print("event type: stop (2)") I see: Breakpoint 2, first () at /home/pedro/rocm/gdb/src/gdb/testsuite/gdb.python/py-events.c:30 30 for (i = 0; i < 2; i++) event type: stop (1) event type: stop (2) stop reason: breakpoint So that seems totally expected, at least for gdb.python/py-events.exp. I don't suppose that somehow your internal testcase does the same and somehow that wasn't noticed before? > Hmm, I'm cross compiling Cygwin gdb and that doesn't include Python support. > I'll see if I can set things up to enable Python support and run > gdb.python/py-events.exp with Cygwin. > I managed to do this. That exposed a number of pre-existing problems, as usual... All fixed with this series: https://inbox.sourceware.org/gdb-patches/20260522001626.393908-1-pedro@palves.net/T/ Nothing related to the non-stop support, though. Pedro Alves