Re: [PATCH v5] Change message when reaching end of reverse history.

Eli Zaretskii
2024-07-09T02:25:46Z

> From: Alex Chronopoulos <achronop@gmail.com>
> Cc: Alex Chronopoulos <achronop@gmail.com>
> Date: Mon, 8 Jul 2024 21:27:30 +0200
>
> In a record session, when we move backward, GDB switches from normal
> execution to simulation. Moving forward again, the emulation continues
> until the end of the reverse history. When the end is reached, the
> execution stops, and a warning message is shown. This message has been
> modified to indicate that the forward emulation has reached the end, but
> the execution can continue as normal, and the recording will also continue.
>
> Before this patch, the warning message shown in that case was the same as
> in the reverse case. This meant that when the end of history was reached in
> either backward or forward emulation, the same message was displayed:
>
> "No more reverse-execution history."
>
> This message has changed for these two cases. Backward emulation:
>
> "Reached end of recorded history; stopping.
> Backward execution from here not possible."
>
> Forward emulation:
>
> "Reached end of recorded history; stopping.
> Following forward execution will be added to history."
>
> The reason for this change is that the initial message was deceiving, for
> the forward case, making the user believe that forward debugging could not
> continue.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31224
> ---
> gdb/NEWS | 5 +++
> gdb/infrun.c | 9 +++++-
> gdb/testsuite/gdb.btrace/non-stop.exp | 32 ++++++++++++-------
> gdb/testsuite/gdb.reverse/break-precsave.exp | 6 ++--
> gdb/testsuite/gdb.reverse/break-reverse.exp | 4 +--
> .../gdb.reverse/machinestate-precsave.exp | 2 +-
> gdb/testsuite/gdb.reverse/sigall-precsave.exp | 2 +-
> 7 files changed, 41 insertions(+), 19 deletions(-)

I'm not sure this change warrants a NEWS entry, but if it does, the
NEWS part is approved. Thanks.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>