From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FpzEDSEammlJfwQAWB0awg (envelope-from ) for ; Sat, 21 Feb 2026 15:48:33 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R3MGjHQM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2549B1E08D; Sat, 21 Feb 2026 15:48:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 1DB561E08D for ; Sat, 21 Feb 2026 15:48:32 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9C28B4BA2E1A for ; Sat, 21 Feb 2026 20:48:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C28B4BA2E1A Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R3MGjHQM Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 889FF4BA23CC for ; Sat, 21 Feb 2026 20:45:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 889FF4BA23CC Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 889FF4BA23CC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771706706; cv=none; b=JLn1ZaFuudB1yzCsZjOXLtx3ZXpLnPEUiYxvQR48LzvXfogC4FmHq70+yaJOCUDLQUW+Kif6gXdDw+++Xu7n2e8Gzho6loAm892tFwhPOeZUfzUAFb6OyU0xLM6PIWwhcMLJjuiJmKRc29JOX618m8LL+tkafaQm7B0QIQ1llXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771706706; c=relaxed/simple; bh=o3wvM/FpqlxIJ6lq0LyTecT93jTw7QW2lrLjUrMAk84=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=IM43I2R6XFgUAuEVkzm/Mk+PfwtzN9yZ7P4PgBy3bHT3gONFbI5VrzcGDdsky6L9vzpKygycMlCxkKETu5XYdUL19E3S0DNutiOgPwyr6tYVZroY02YNcTAAWniHdYPAH5+/ZNteG2PaHuyRsOwV5ZGw1sg0HhZV2S6D66gWwQk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 889FF4BA23CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771706706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OVvuZaEJmRa48Zi2uOL7Cq6A+ah/uDhtG63E8MsGEJ8=; b=R3MGjHQMwELfsxRqVyvXvAhtNKiMTArdXUjGEKuyf8dP3SMUxmKw2IUOfsspyqlIAeyxc3 OcM5bhKcOicp0r8puu1VA6L2YHYfSn2bwU9IzM7DCSjF3gJAQdwHLNnCMPeM1RA3JFuwJd 6Fd1gLwLYq3s2lZH32vszo5P6OvEIGI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-cFoPjOBTMK-voHzkqwvSDw-1; Sat, 21 Feb 2026 15:45:02 -0500 X-MC-Unique: cFoPjOBTMK-voHzkqwvSDw-1 X-Mimecast-MFC-AGG-ID: cFoPjOBTMK-voHzkqwvSDw_1771706702 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7EEBD18003F5; Sat, 21 Feb 2026 20:45:01 +0000 (UTC) Received: from f42-zbm-amd (unknown [10.22.88.9]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9B8331955F22; Sat, 21 Feb 2026 20:45:00 +0000 (UTC) Date: Sat, 21 Feb 2026 13:44:58 -0700 From: Kevin Buettner To: Tankut Baris Aktemur via Gdb-patches Cc: Tankut Baris Aktemur Subject: Re: [PATCH v2] gdb/infrun: do not restart a stepped thread if not running (was: gdb/infrun: reset thread control's step info in end_stepping_range) Message-ID: <20260221134458.51f80ad5@f42-zbm-amd> In-Reply-To: <20230620152455.471716-1-tankut.baris.aktemur@intel.com> References: <20230620152455.471716-1-tankut.baris.aktemur@intel.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xMTwY2VCR3_9yRnHfmOnihUNshHrhB_GzX8LDvG_XKw_1771706702 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII 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 Baris, I've taken a look at your patch and have found a few nits that'll merit a v3, though some, I think, are due to changes made to the testing framework since you originally posted your patch. The C code looks okay to me, but posting a v3 with the testsuite nits fixed might get a few more pairs of eyes on it before it goes in. On Tue, 20 Jun 2023 17:24:55 +0200 Tankut Baris Aktemur via Gdb-patches wrote: [...] > diff --git a/gdb/testsuite/gdb.multi/detach-stepi.exp > b/gdb/testsuite/gdb.multi/detach-stepi.exp new file mode 100644 > index 00000000000..28ef8c4f9f7 > --- /dev/null > +++ b/gdb/testsuite/gdb.multi/detach-stepi.exp > @@ -0,0 +1,66 @@ > +# This testcase is part of GDB, the GNU debugger. > + > +# Copyright 2022 Free Software Foundation, Inc. I think that the copyright year should be updated. [...] > +standard_testfile > + > +if {[use_gdb_stub]} { > + untested "using gdb stub" > + return 0 > +} The above should be replaced with: require !use_gdb_stub Other tests in gdb.multi also use: require allow_multi_inferior_tests ...so I recommend adding this too. > + > +if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { > + return -1 > +} > + > +if {![runto_main]} { > + return -1 > +} > + > +delete_breakpoints > + > +# Setup inferior 2. > +gdb_test "add-inferior" "Added inferior .*" \ > + "add empty inferior" > +gdb_test "inferior 2" "Switching to inferior .*" \ > + "switch to inferior" > + > +gdb_load $binfile > +runto "a_function" > +gdb_test "info inferiors" Is there something that you want to look for with "info inferiors"? Or is it for debugging purposes? > + > +# The bug for which this regression test is written appears in > +# schedule-multi mode. > +gdb_test_no_output "set schedule-multiple on" > + > +# Single-step the thread in Inferior 2, then detach Inferior 1. > +gdb_test "info threads" ".*" "threads before stepi" > +gdb_test "stepi" Is there some pattern which might be usefully matched for the stepi? > +gdb_test "info threads" ".*" "threads after stepi" > + > +gdb_test "set debug infrun on" Use gdb_test_no_output for the above command. > +gdb_test_multiple "detach inferior 1" "" { > + -re "resuming previously stepped thread.*$gdb_prompt" { > + fail $gdb_test_name > + } > + -re "$gdb_prompt $" { > + pass $gdb_test_name > + } > +}