From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EpWcIZonoGrnRTcAWB0awg (envelope-from ) for ; Tue, 08 Sep 2026 11:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1788880794; bh=J+z55/XFVrWFLM7nWseulZRtU8PnuGlKHy6B67Cghf0=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hqbfEkOdy0Dg+HBlunulbtFAPFxZaToIuqyKW/O6V3gf45mvKXXCyCiZGajqhYjYB UOasYvc/1/LSaA6S+N9qPevPDrDz8BOtodGDVYz4x8CTx1UkPbKXHEIsqgP/dLHu2n 5pjRNgEtE+JnIjYba3hzejmqWRdPeFtXg3ZjJ/SY= Received: by simark.ca (Postfix, from userid 112) id 6DDF91E033; Tue, 08 Sep 2026 11:19:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=J2JnbhsM; dkim-atps=neutral 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 8CFC91E033 for ; Tue, 08 Sep 2026 11:19:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 461AB4B920DF for ; Tue, 8 Sep 2026 15:19:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 461AB4B920DF Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=J2JnbhsM Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 92A6B4B920CE for ; Tue, 8 Sep 2026 15:18:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92A6B4B920CE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 92A6B4B920CE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788880693; cv=none; b=E/pBgT02DDEaGsFGT16YAT7jz8oVPGKwiIniggO2QcthzOS9GPl4ZQS4Fv2ANibwovJQVkigKolNDhfEJQVCI/aelgUJ5hZzfLtYVpaT1FwHzP2YzWCT/vNSPD3ffdit0dIM3aAxFS8jH32C489ckYh3F5/eY1KCQVmhTk2hT/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788880693; c=relaxed/simple; bh=J+z55/XFVrWFLM7nWseulZRtU8PnuGlKHy6B67Cghf0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Tru+lvmlTxlrCeC+npi1eYVni0+miiwsiM0UFcd1/UbYgWdqljaGGmHse1t1hRjNYzZCZ2IsAQbwTR3lmlID05R7MWaY6RFLjBSNQ6XJ/+k/GMKGXG4QhDB16xrh3sMyVaMDxO19g7SjooFKq8sh97LSjJh1ppqJQkVZR9Ftj3U= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=J2JnbhsM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92A6B4B920CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1788880692; bh=J+z55/XFVrWFLM7nWseulZRtU8PnuGlKHy6B67Cghf0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=J2JnbhsMlmiIGQR5kG1G9kdb8aVT8QqvB70ej1ht9g2FKy2gqzf5Lm3G0ATmI8Yvc 6OmELpvbnCwYHlr2hbw68dLseJU4kgfDWYI6Bj++Z2YTqVQOifmSU/KqJmvZnUH2Pp CDGC/M36WmbCNX1A/h+R9XchuxiyvP1eVJgvFfIY= Received: by simark.ca (Postfix) id 581EA1E033; Tue, 08 Sep 2026 11:18:12 -0400 (EDT) Message-ID: <1ea00472-ee53-402f-b8a1-a51a49f5f9a6@simark.ca> Date: Tue, 8 Sep 2026 11:18:11 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/record: fix missing "no history" message in some situations To: Guinevere Larsen , gdb-patches@sourceware.org References: <20260908131400.28513-1-guinevere@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260908131400.28513-1-guinevere@redhat.com> Content-Type: text/plain; charset=UTF-8 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 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? > --- > 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