From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mRTEESH7yGrH6R8AWB0awg (envelope-from ) for ; Fri, 09 Oct 2026 10:33:05 -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=OPCdxE9v; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3F2901E04E; Fri, 09 Oct 2026 10:33:05 -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 3E5A11E04E for ; Fri, 09 Oct 2026 10:33:04 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D6634BA2E18 for ; Fri, 9 Oct 2026 14:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D6634BA2E18 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=OPCdxE9v 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 6C04C4BA5436 for ; Fri, 9 Oct 2026 14:32:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C04C4BA5436 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 6C04C4BA5436 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=1791556354; cv=none; b=td3Ml+EtV19QyPW8KppNCekiF77h31J1GNE63z55uQIpbLMEs8u2AMWO7mL0Rxdu0RQwiZj9HeS3rsDqxT+92DBbOYyZnHy1lewiHT05kH/UlFzzO3y7g2Pod58XF2SrV6tCfJGTxKMhTVInGkWiBgRSwXDmDOOIfvLLWfxOiEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791556354; c=relaxed/simple; bh=9goZSOZIe3SLDBcuBgBlFCzUmjh4aBHQyN1czZ/jmts=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=IojTVtICcIXY9ChavI4SilIXvfTSElb5palubuEUrGSGU58zqZrDFqMzfIw1y8fxpOZ8kdjS/cXfa9mCWtQWUATF/drFeA15w1HuFzcnbITHsJ67F6OXG8U3/wpvOnMuwy1afEx0r5a334O5010bDBpS7DVdivnC7eIc+NVmApA= 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=OPCdxE9v DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C04C4BA5436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791556354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3bCPbABsWAsMZvnIXw391AUAbyPhDVAV6nhZYYhDANc=; b=OPCdxE9vxQDtdau1e86f9ruE2yOAHTzbAc4S5C8i7br3h1zIdFn/TImp3pc9EIVfo2qGSb EUJKa3d+pSIs4mWOijRw371xP1MBOuSCAGmI2lEq7zagn+jhnDfVwWaY0LAHIEvv0BYIco fevr/tamh9leFRI7PhcNqe7BsUJpiAU= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-297-ahDNsgnDNuKFOy0XO817Hw-1; Fri, 9 Oct 2026 14:32:26 +0000 X-MC-Unique: ahDNsgnDNuKFOy0XO817Hw-1 X-Mimecast-MFC-AGG-ID: ahDNsgnDNuKFOy0XO817Hw_1791556346 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93dea1b6c89so1182777085a.2 for ; Fri, 09 Oct 2026 07:32:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791556346; x=1792161146; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3bCPbABsWAsMZvnIXw391AUAbyPhDVAV6nhZYYhDANc=; b=PcGoW82XQce0zUrk8gymU6nfkqVxnQscLFf2EAROEXrrv/DfJjQ9AvjANtJWJPnA5P PA7ye+63LYvhketnTGXOmJ6IApbUB+syAiTfvaEjv6f6qfXiWuveCUCLpQtJsQqKzU+N DhSGlMtWGt5sVxcNsernj+KtyfchKhzVh2tTVDTGpkzxMhFA56YlIix1hOdrT25i+8k5 BPWJwWgzUnBeqAzxWaLYkwaKXe18OErrxVsAJsqB3EBDnvSVv7P7sQLiJZbKF9JUuEem wGRYvYd5EW3jsdnlRo20ln5mTGvcxBCXNwGEXboq6UkP0DczFe3ZEk4uBBQJChMEqBwx 9kBw== X-Forwarded-Encrypted: i=1; AKwUvBxEKddlELLXWjXZNojWt20hkYpW/QrWOOUalA1sayTm3kp3N5hBsuUDGSk/tUQZlF861KgY83PEoFc3xw==@sourceware.org X-Gm-Message-State: AFq9FYIEBgHrry0MN4CX6OV4g0aB8yx3vuhcaeOmIaeHxFPhQkNYt3qA tw4P5WsD7rK5s6oV2Tv3o7gmAFfHMfHjbpDDs2VFOoPO7T6bxZlmF/B8K5dLJoMP3aJIItmbCdi bgyVgNJj+cG42lPZ/XXnz1RvNWTd0GNyPx0UWgc5MW+200zckFmpvf+Z8gXB0fzc= X-Gm-Gg: AYBFou3Yd8f/mFcmXTWlaqdBGkea1LZj0OjQcqisSoZenxsH45qVs4EFbupu5Z6zG4X cDVAnfc4rtfbyuKFMe2/qbHSpgLAdqZWRrtGFDc1qmA+owfsuxcjDoS5z/SQGinP/CFJwHuWwF8 07OVE26Q7te0CqU4p1djN0T48I+ryf0rLRXSPxZaoDwIiE/BPd4dfig6rYRI2XGsrKtuF24Fvww 8uNdyewYtdMXBpuWmXDLIHRjKATvmPr6qUxqBFLdpXbaiaZBT7Y9TdDM3nqYUx6vHPOio8kS67q a+mxVapjD1+acXNmj9ayu0MTBCpEDrTIHgI58CzJ0KQDkH106ZDPcBM6PGC9afwcfTGINC6b+da exMWghiuRTs88cSD//BDP5KSKY9ajSlNhMo+Mk7e48lnsYp9k X-Received: by 2002:a05:620a:a0c1:10b0:93e:c12c:4401 with SMTP id af79cd13be357-93ec12c4975mr152608985a.78.1791556346247; Fri, 09 Oct 2026 07:32:26 -0700 (PDT) X-Received: by 2002:a05:620a:a0c1:10b0:93e:c12c:4401 with SMTP id af79cd13be357-93ec12c4975mr152603485a.78.1791556345551; Fri, 09 Oct 2026 07:32:25 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e:22e8:4ed1:527a:55c0? ([2804:14d:8084:993e:22e8:4ed1:527a:55c0]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93eb9895f91sm199747585a.28.2026.10.09.07.32.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Oct 2026 07:32:25 -0700 (PDT) Message-ID: <8ba00058-b003-49d7-b7ee-c47ef7c41ed1@redhat.com> Date: Fri, 9 Oct 2026 11:32:21 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/record-full: fix stop status when inferior isn't resumed To: Andrew Burgess , gdb-patches@sourceware.org References: <20261007204014.893637-1-guinevere@redhat.com> <87mrsntaov.fsf@redhat.com> From: Guinevere Larsen In-Reply-To: <87mrsntaov.fsf@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5v6nyEI-1hC1GFZGNlgEmU-zzb-YDvUz4MfDCMpma9g_1791556346 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 On 10/9/26 7:44 AM, Andrew Burgess wrote: > 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..." Fixed. > >> 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. I am pretty sure that this can't really be tested. Besides, once my updates on multi-threaded recording land, this use-case will be tested multiple times, most likely (and at least once), so it feels unnecessary to add a specific test for this. I'll add a comment about that for v2 > >> 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. Fixed > >> --- >> 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? Fixed -- Cheers, Guinevere Larsen it/its she/her (deprecated) > > Thanks, > Andrew