From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YbxBLrj8yGq/9B8AWB0awg (envelope-from ) for ; Fri, 09 Oct 2026 10:39:52 -0400 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=IdLzzjC4; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AC1A31E051; Fri, 09 Oct 2026 10:39:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 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_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 785B51E04E for ; Fri, 09 Oct 2026 10:39:51 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6F224BA2E23 for ; Fri, 9 Oct 2026 14:39:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6F224BA2E23 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=IdLzzjC4 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 1AD104BA5436 for ; Fri, 9 Oct 2026 14:39:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AD104BA5436 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 1AD104BA5436 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791556767; cv=none; b=PGgn24Jann/SlgoqKzi+otwbQNtVU0bgNFLPqLwnrHWdowlrGcYWPaaV9ys2AW46uS6lbfZ5QkOkms9WNBnTFdX8Yk92eShSZvulyj2ffD+DS52INZLZL/WfDyi4GrSD8a9UcyHqDJSzA/LStqMDkFENVO3wRZgU4D1GAuI40D0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791556767; c=relaxed/simple; bh=+DooJfVsZ4FFevF70y6no6nn2110ARhpeU/wUztSHkI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qDveh6/u0ZCXFHtDOUAwAxFj3ySN5swNJSYARljPmCjUUeaU0HMCqfv5+q/wGO4grmQfvhivGMSp9nM7Khzb8LvmeMXgC316pX8yiUkN1yVmJgzK99P6gypMP02X85XGSkkij7tgr6Ln/Wt5J4VIuHbmHbwlFBL3AQP8VXhnSCg= ARC-Authentication-Results: i=1; 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=IdLzzjC4 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AD104BA5436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791556766; 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; bh=7HAWZyKiwTLAE19WZ8PnRbzC7MZnG0i6rjgqilZwncE=; b=IdLzzjC4WCT4PscFGSuxsnLslNodf8GtNTFdCi/gFgRswv2wcau2VfHgMHlfWoWlNOCk8m dNlxIdUUOPTb+rhh/zg+0gLCNqUQBHfrVjR/E5MX5qXx40NdkdsZEyChCk84K4tEQjcVEf a8dyxbxURTQprurehwxqtPp9rupMdhQ= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-Tz4hXDQJNViaozrAewcG4g-1; Fri, 9 Oct 2026 14:39:25 +0000 X-MC-Unique: Tz4hXDQJNViaozrAewcG4g-1 X-Mimecast-MFC-AGG-ID: Tz4hXDQJNViaozrAewcG4g_1791556765 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8CB711955DE3 for ; Fri, 9 Oct 2026 14:39:24 +0000 (UTC) Received: from glarsen-thinkpadp16vgen1.rmtbr.csb (headnet05.pony-001.prod.iad2.dc.redhat.com [10.2.32.117]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5620318004D2; Fri, 9 Oct 2026 14:39:22 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v2] gdb/record-full: fix stop status when inferior isn't resumed Date: Fri, 9 Oct 2026 11:39:16 -0300 Message-ID: <20261009143916.47983-1-guinevere@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mtWdS2xV2ltGLkZao0bp5jB62c0OTEagzKF5_0DVklA_1791556765 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 wait function for the record-full target has a check for whether or not the inferior should be resumed. However, when we correctly identified that it shouldn't be resumed, we incorrectly set the exit status as "ignore", as though the inferior had resumed and had an uninteresting stop. This would cause a problem when - for example - GDB has to wait for all threads to actually be stopped, because we do that by waiting until all threads have a wait status of "no_resumed", and the "ignore" status would make us iterate over them and wait more. This commit fixes that by setting the status correctly to not_resumed. The commit does not include a test because almost nothing works with multi-threaded programs, and my upcoming series will exercise this code path plenty of times, when testing it makes more sense. --- gdb/record-full.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/record-full.c b/gdb/record-full.c index 26bd85d34f6..45b7b4b39d1 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1063,7 +1063,7 @@ static int record_full_resume_step = 0; /* True if we've been resumed, and so each record_full_wait call should advance execution. If this is false, record_full_wait will return a - TARGET_WAITKIND_IGNORE. */ + TARGET_WAITKIND_NO_RESUMED. */ static int record_full_resumed = 0; /* The execution direction of the last resume we got. This is @@ -1187,8 +1187,8 @@ record_full_wait_1 (struct target_ops *ops, { gdb_assert ((options & TARGET_WNOHANG) != 0); - /* No interesting event. */ - status->set_ignore (); + /* No thread was reusmed at all. */ + status->set_no_resumed (); return minus_one_ptid; } base-commit: d2c5672687e46b23a9dcb6f88c878cb2df06819a -- 2.55.0