diff options
author | Guinevere Larsen <blarsen@redhat.com> | 2024-08-26 10:33:17 -0300 |
---|---|---|
committer | Guinevere Larsen <blarsen@redhat.com> | 2024-08-26 10:33:57 -0300 |
commit | 089197010993b3a5dc50bf882470bab2de696d92 (patch) | |
tree | f7a7cb3d6c85407548976115ef17358d9774a6ac /gdb/infrun.c | |
parent | 05b3e96495386ee41358c68b8787274ce77ae049 (diff) | |
download | gdb-089197010993b3a5dc50bf882470bab2de696d92.zip gdb-089197010993b3a5dc50bf882470bab2de696d92.tar.gz gdb-089197010993b3a5dc50bf882470bab2de696d92.tar.bz2 |
Change message when reaching end of reverse history.
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
Reviewed-By: Markus T. Metzger <markus.t.metzger@intel.com> (btrace)
Approved-By: Guinevere Larsen <blarsen@redhat.com>
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index f2d28ca..4ca1545 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -9267,8 +9267,15 @@ print_no_history_reason (struct ui_out *uiout) { if (uiout->is_mi_like_p ()) uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_NO_HISTORY)); + else if (execution_direction == EXEC_FORWARD) + uiout->text ("\nReached end of recorded history; stopping.\nFollowing " + "forward execution will be added to history.\n"); else - uiout->text ("\nNo more reverse-execution history.\n"); + { + gdb_assert (execution_direction == EXEC_REVERSE); + uiout->text ("\nReached end of recorded history; stopping.\nBackward " + "execution from here not possible.\n"); + } } /* Print current location without a level number, if we have changed |