From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5pfUF8TFyGq8kx4AWB0awg (envelope-from ) for ; Fri, 09 Oct 2026 06:45:24 -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=J90mqiXM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3B2EE1E051; Fri, 09 Oct 2026 06:45:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 BFC6B1E04E for ; Fri, 09 Oct 2026 06:45:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D46C54BA2E1C for ; Fri, 9 Oct 2026 10:45:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D46C54BA2E1C 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=J90mqiXM Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id DB3484BA5436 for ; Fri, 9 Oct 2026 10:44:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB3484BA5436 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 DB3484BA5436 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791542694; cv=none; b=esoKfPa4GPC9zzn7EMQDWjOxGADJrkxs7jfKE5jpdcN0AlenuP7YOMEI2aPrWwBGmaAiBSw4OSEQQu+S9me3hfeJiA/SQ7lHggy4OrdqADtZn/2lBuGbY9RZ3pmv9GlxSFG9Kma9IsdgNz4J8trBhJOv+gTKsNV8QlS9pjMU10c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791542694; c=relaxed/simple; bh=uEIvQDdR3JF20awDak6Tk2/98GRhtqoKviNBTIaHkyQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Jonk9f0/+GFvCHlq1G/M3LK2vhRF1bqyx2bsdt8/BjVYzd8nAlVz8++DbP6WvD8P2ddanOHf/irqEahzUAxGdmFEuvVXZqYwq+LX/09I+jrk/EsQxps08JVEDRwxtYGC5lf0tu+3hYW2bttrebCQKqGR2StWPa5yCGZ3KgXSJ4I= 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=J90mqiXM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB3484BA5436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791542693; 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: in-reply-to:in-reply-to:references:references; bh=YzY7/Vkq0PHQTvOjJN6+6yKOM+UJ4NKacP2zBCF98lo=; b=J90mqiXMS6QxY0gTbnqbTYupy2EWKcLx8CtE2n7E7GH4xBEpYLPiSMid9TNYLmDzlsyG5H HGh8VpqYm2LmibAZh39Zy5g5iSSaSY+4ZFyykI2/IfAX/LgDqHN71f3YUqBmxSZKln2utW r/nyo4IOyGgUSh1EWZkgkuSureTMqD8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-448-Gju7kLKcPeyQHPt-lUNH0g-1; Fri, 9 Oct 2026 10:44:51 +0000 X-MC-Unique: Gju7kLKcPeyQHPt-lUNH0g-1 X-Mimecast-MFC-AGG-ID: Gju7kLKcPeyQHPt-lUNH0g_1791542691 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-48afe000b94so5160020f8f.3 for ; Fri, 09 Oct 2026 03:44:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791542690; x=1792147490; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=YzY7/Vkq0PHQTvOjJN6+6yKOM+UJ4NKacP2zBCF98lo=; b=0ZJg5E5k/zyAIlWWiG7RYBr0uUfRRRnaQkojHlLA+b1v+m7EYb4e+DwrddHdfIcb1s E8CUHGtvIixbNTS9ZWNHoGsRr4Z6eqcHA/6mkNW3/9rpMyjxSamCaIXp7QcgnZaJOXJi tke+Mw2D84X6omdZX4Za7HAvbu7i8hcgx5nDD8anxbscVSkeGFjCEEUF9+voIXd0PIU8 /KRGR4142V0csrXcD6MmRw1fDOoktfFZ5Dy1oJd7VsaODC2wkdotfdtP50/dzQ77yBIJ Bbn4JwSvbqVTSEVjMuMomyAgTVFs6VwxQOIyr+HT+zCHslm5Hm/o/rbfFNDN/jeeiElY iY3Q== X-Forwarded-Encrypted: i=1; AKwUvBxgSHW5HNyOhTeuIszwU83CPro/y9VAvPBnWr6BM4d0kQWitjnBFZO/1B3Vn9bwvJWXkvCYW+q38MzbTQ==@sourceware.org X-Gm-Message-State: AFq9FYIUsX1Ik9r4uc9stSPfytS6YgAAZ3mFfKjJok8Z/PvBf9C2uTcG IV18jjXgdlvBvVSZQU7FhhDYm9KUvQEC7urkvchwbbq/EW/8LNyEcRF198yaP78Fj0b5cvPZ7OO 9sEGmLGrAIue58ofYhfyy0oWUsT9I+mLhCFS87z6FfE3JFLT8urs6nzW5D/jj3kZZ5uK9ukU= X-Gm-Gg: AYBFou2soV9suLZPXuN6lbpWMZxXUg8gKbVurn6GUoBDiChnmbDktVlM+LIZNEL4NbQ DEqh6lwvLGcfIUl215ZvqvbwE1GdDSCxbA9VUK0bo/GbqWeZ+ibqJVR1R9e2VRXMgGbudutZTxE 47QAfUFGLVuCI97E6pxObSfG5pTSI7/Nz0d1wRAbvBf/IfWuXFKAqsOTIARcFLPCZbcJ0KAWo7D jJRmaavORQsphoyPMCz5vr/q+srWswvBIr2ojp93vwYnCb+2D+kX2fKgfj/yyNU3f4QY4H0cCdR GYdl99n5UGyWi1vhrA0ciC6LUhmwxIioVQPZMurCMbBFs0hQPYiCArSrZ6ty9pmCqMBH X-Received: by 2002:a05:6000:25c1:b0:48b:9d2:1a6a with SMTP id ffacd0b85a97d-48dba78a613mr2542022f8f.1.1791542690473; Fri, 09 Oct 2026 03:44:50 -0700 (PDT) X-Received: by 2002:a05:6000:25c1:b0:48b:9d2:1a6a with SMTP id ffacd0b85a97d-48dba78a613mr2541992f8f.1.1791542689998; Fri, 09 Oct 2026 03:44:49 -0700 (PDT) Received: from localhost ([213.31.44.29]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48db94e30a7sm3372622f8f.12.2026.10.09.03.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2026 03:44:49 -0700 (PDT) From: Andrew Burgess To: Guinevere Larsen , gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: Re: [PATCH] gdb/record-full: fix stop status when inferior isn't resumed In-Reply-To: <20261007204014.893637-1-guinevere@redhat.com> References: <20261007204014.893637-1-guinevere@redhat.com> Date: Fri, 09 Oct 2026 11:44:48 +0100 Message-ID: <87mrsntaov.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Dzsb5mrFWJPwAamL7TXetO6-TxpJXJPDRbK51bcqeME_1791542691 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Guinevere Larsen writes: > 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 all Missing word: "...we do that by waiting UNTIL all threads..." > threads have a wait status of "no_resumed", and the "ignore" status > would make us iterate over them and wait more. Your excellent "this would cause a problem when ..." description makes me ask why there's no test included with this patch. I know that multi-threaded recording is not working well (or at all?) in upstream GDB, so maybe it's just not possible to test this right now. If this is the case then it might be worth a sentence to explain this in the commit message. > > This commit fixes that by setting the status correctly to not_resumed. There is a global variable `record_full_resumed` which is documented like this: /* 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. */ static int record_full_resumed = 0; With this change I think that this comment now needs to be updated. > --- > gdb/record-full.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/record-full.c b/gdb/record-full.c > index 26bd85d34f6..f56b3dfc7fd 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -1188,7 +1188,7 @@ record_full_wait_1 (struct target_ops *ops, > gdb_assert ((options & TARGET_WNOHANG) != 0); > > /* No interesting event. */ > - status->set_ignore (); > + status->set_no_resumed (); I think the comment "No interesting event" could be improved, maybe "No resumed threads" or something similar? Thanks, Andrew