From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ebpGO1R2oGqgBTgAWB0awg (envelope-from ) for ; Tue, 08 Sep 2026 16:55:49 -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=dTHqSnR7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EE3261E09E; Tue, 08 Sep 2026 16:55:48 -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=unavailable 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 617FD1E033 for ; Tue, 08 Sep 2026 16:55:48 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9EC94CCCA20 for ; Tue, 8 Sep 2026 20:55:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9EC94CCCA20 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=dTHqSnR7 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 4A5894BB3BB3 for ; Tue, 8 Sep 2026 20:55:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A5894BB3BB3 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 4A5894BB3BB3 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=1788900923; cv=none; b=DWzKRX7M6iY87M8YVpgzO+QJfg69aCk4MPb6vK6pQt6J65kEcl5YsnBzxdhFb3Y7f4nHQzPjTSKz+F3PbHFAHii9clVNInLUgvmnapc5yN+FMwvcdXT4B2fDtm7RaukLkOvtVLn0rO7K1v8JSc0bb6SPGTHLE8U24wuOLNVenX8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788900923; c=relaxed/simple; bh=aZ/7mFwHhZ9dwgGuwjRdeHzodTDKKdowiPKUILgCb6k=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=R4XWi4h21koflODKrjP69JR3Izl8X0kz3XfxKEvikSsslJrLO1NASOKsc7aadKaZQcmnZtmsDb6PX+YQ4waG30VRo3xQFNiV2+rVIHXGIKNYBmsb8lPB2EPKgpXWDLj+EO2ziut9Kn4jaYGMEUN1SNW0IdH/0qGp6/k7385pn7o= 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=dTHqSnR7 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A5894BB3BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788900923; 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=ORBMSWF3lkexw8yci8J/ico3KghsDtmO6Lv9F3aoqeg=; b=dTHqSnR7xeflghCEjQxjdTAFt/SRooX2/saB4rzbajTNaamy3Y3Q2hidIoIBZyg1FPq6EF PNOwT2NmqKOg/xyNYggEtoeBVMsMUmzYUhN8e/vgC+DDAHUO/ff8AK5e9KzijCEFb5rPMz 5Yo5Wa6ZB6ABwKCz4kRzFiej7h+wXqQ= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-73-6YBH5DQPPWKXTr_x1uVo2Q-1; Tue, 08 Sep 2026 16:55:21 -0400 X-MC-Unique: 6YBH5DQPPWKXTr_x1uVo2Q-1 X-Mimecast-MFC-AGG-ID: 6YBH5DQPPWKXTr_x1uVo2Q_1788900921 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-836c8fc09cfso105469477b3.1 for ; Tue, 08 Sep 2026 13:55:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788900921; x=1789505721; 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=ORBMSWF3lkexw8yci8J/ico3KghsDtmO6Lv9F3aoqeg=; b=oGqAYwIMsEi4p56H1Cr3U0HOaS0X3iv4Ly0d9e/ci77jMfcMwco3qIgjwklvnSCAQL CVFt4EJE44jWqQJnan0P2Roch8ZAu2ei1HlrmAqj42XUNEXykdvECxeAQCerLcghfFdP HBSz85LjHSAwYG/QmPtubz6PmBTqF/ArvTBtz4rXTZwmQdpOJqD/N+BCdkVIwvesvUMi iiQ7h6dO0LMWDBau+rRbwJw4pp9Ho4Cfg6yodDpeLvtnGkJrIeTg9wuheECIg1HcQ6fO nD8IO0bBz+saERjL0H3DaXKncoH2xZmJNQ39ZPylhq7zx2Dsnlh5yYGKb18Bb+pMF2bS CqaQ== X-Forwarded-Encrypted: i=1; AKwUvBw8gZGiDN5+EQgrd/brzd1cQ/PSheaWqIeliHF03FLYRHIO6rY3YhkSXyTKj6c/LbWjIzIYoPmePxlFjw==@sourceware.org X-Gm-Message-State: AFuF++kqAKDdD1IxQ3sCAhHA2nXniVcK//0XJeXhTAcGREZ5IEqxIik1 AHU1ErrHH66mkQjnJ4hwgiBgVXK+EmWdbopXJ4fnXWECSecUnrWdkJsYWhAXS/1GF/iDvj4byx0 5Rwz3zEJ/DStQ2Is6L87b/1NljRATcx+mIokx8J2nyOYgjr4kz2bkaInYxU8vbe4= X-Gm-Gg: AYBFou1Rxe+VGNWufTdqvhRhglY64jAyaGLH+YSxL+8Hcx7diwBVKg5dIaVKP2YSTz5 GOoolvC2gciHMQLMBDCzOiCeZ8KRe/11MEer7uWNrkiFbt8QzFlsSM1LVrg2O5gkzHiKS8I/NIw +yqV/I8osk53sWQJzRYKscrlgVNhlDVoTaXu1IvwvLPr6NGfNxSSRAhudivB46SCKyEOb8LpnnY qVW7DTVpiZHhRJuF311C3onomkPtytV2DLX4H469zPIRODwDuiVCCe39vcpURYK9umuXLMdLQFT qDZmMTP2m5JF8Tr9+UOia2RH7qDhzS1nMMDu1feD5Mlp6D/Aa7pQ8YpvfjvyixwhPtQ9t/mIHaE CCJMSB9M8X6aWeNpgzc4VCQ45OEbG8nuh0gOrVJtvruk2ce2pYg== X-Received: by 2002:a05:690c:887:b0:873:5c7b:c102 with SMTP id 00721157ae682-8735c7bc1d6mr88149457b3.58.1788900921244; Tue, 08 Sep 2026 13:55:21 -0700 (PDT) X-Received: by 2002:a05:690c:887:b0:873:5c7b:c102 with SMTP id 00721157ae682-8735c7bc1d6mr88149357b3.58.1788900920817; Tue, 08 Sep 2026 13:55:20 -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 00721157ae682-8714b720d82sm99539967b3.41.2026.09.08.13.55.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Sep 2026 13:55:20 -0700 (PDT) Message-ID: Date: Tue, 8 Sep 2026 17:55:17 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/record: fix missing "no history" message in some situations To: Simon Marchi , gdb-patches@sourceware.org References: <20260908131400.28513-1-guinevere@redhat.com> <1ea00472-ee53-402f-b8a1-a51a49f5f9a6@simark.ca> From: Guinevere Larsen In-Reply-To: <1ea00472-ee53-402f-b8a1-a51a49f5f9a6@simark.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 4g4vZ9FcbBv_hgo9DjcVQ2FJKnysCR00m0bsDLNN4Bw_1788900921 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 9/8/26 12:18 PM, Simon Marchi wrote: > On 9/8/26 9:14 AM, Guinevere Larsen wrote: >> I recently noticed that the end of recoded history message wasn't > recoded -> recorded > >> shown when replaying an inferior until end end for the first time, it > "until end end"? > >> was only shown when trying to reverse past the start of >> history. Executing forward past the end will not warn the user that >> recording is going to start again, it just does so. >> >> This was happening because the out-of-history was only set when it >> caused the execution loop to stop, so using "next" to reach the end of >> history, for example, wouldn't trigger it as I expected. This commit >> fixes that to make out-of-history check only happen after the loop is >> finished. > Can you give examples of "before" and "after" GDB sessions so that it's > more obvious what the change is? > > Could this use a test? Thanks for the quick review! I fixed all the nits and added the test, which was easier than I thought. v2 is on the way > >> --- >> gdb/record-full.c | 16 +++++----------- >> 1 file changed, 5 insertions(+), 11 deletions(-) >> >> diff --git a/gdb/record-full.c b/gdb/record-full.c >> index 26bd85d34f6..c02bc39f12c 100644 >> --- a/gdb/record-full.c >> +++ b/gdb/record-full.c >> @@ -1362,19 +1362,11 @@ record_full_wait_1 (struct target_ops *ops, >> /* Check for beginning and end of log. */ >> if (execution_direction == EXEC_REVERSE >> && record_full_next_insn < 0) >> - { >> - /* Hit beginning of record log in reverse. */ >> - status->set_no_history (); >> - record_full_next_insn = 0; >> break; >> - } >> - if (execution_direction != EXEC_REVERSE >> + >> + else if (execution_direction != EXEC_REVERSE >> && record_full_next_insn == record_full_log.size ()) > The indentation of this && line needs to be adjusted. > >> - { >> - /* Hit end of record log going forward. */ >> - status->set_no_history (); >> break; >> - } > The indentation of those "break" is wrong, you could fix it while at it. > > Simon > -- Cheers, Guinevere Larsen it/its she/her (deprecated)