From: Guinevere Larsen <guinevere@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/record: fix missing "no history" message in some situations
Date: Tue, 8 Sep 2026 17:55:17 -0300 [thread overview]
Message-ID: <bc6761c7-f1c0-4280-95d9-e103f0ab342e@redhat.com> (raw)
In-Reply-To: <1ea00472-ee53-402f-b8a1-a51a49f5f9a6@simark.ca>
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)
prev parent reply other threads:[~2026-09-08 20:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 13:14 Guinevere Larsen
2026-09-08 15:18 ` Simon Marchi
2026-09-08 20:55 ` Guinevere Larsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc6761c7-f1c0-4280-95d9-e103f0ab342e@redhat.com \
--to=guinevere@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox