aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/NEWS5
-rw-r--r--gdb/doc/gdb.texinfo2
-rw-r--r--gdb/infrun.c5
-rw-r--r--gdb/mi/mi-common.c1
-rw-r--r--gdb/mi/mi-common.h1
-rw-r--r--gdb/testsuite/gdb.mi/mi-reverse.exp2
6 files changed, 14 insertions, 2 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index d8f4f39..c0aac21 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -17,6 +17,11 @@ maintenance print record-instruction [ N ]
prints how GDB would undo the N-th previous instruction, and if N is
positive, it prints how GDB will redo the N-th following instruction.
+* MI changes
+
+** mi now reports 'no-history' as a stop reason when hitting the end of the
+ reverse execution history.
+
*** Changes in GDB 13
* MI version 1 is deprecated, and will be removed in GDB 14.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dd8f8bc..2f5b4bb 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -30860,6 +30860,8 @@ The inferior returned from a system call. This is reported when
@item exec
The inferior called @code{exec}. This is reported when @code{catch exec}
(@pxref{Set Catchpoints}) has been used.
+@item no-history
+There isn't enough history recorded to continue reverse execution.
@end table
The @var{id} field identifies the global thread ID of the thread
diff --git a/gdb/infrun.c b/gdb/infrun.c
index d5f97e3..181d961 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -8406,7 +8406,10 @@ print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal)
void
print_no_history_reason (struct ui_out *uiout)
{
- uiout->text ("\nNo more reverse-execution history.\n");
+ if (uiout->is_mi_like_p ())
+ uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_NO_HISTORY));
+ else
+ uiout->text ("\nNo more reverse-execution history.\n");
}
/* Print current location without a level number, if we have changed
diff --git a/gdb/mi/mi-common.c b/gdb/mi/mi-common.c
index 51a8aaa..ce70d11 100644
--- a/gdb/mi/mi-common.c
+++ b/gdb/mi/mi-common.c
@@ -39,6 +39,7 @@ static const char * const async_reason_string_lookup[] =
"syscall-entry",
"syscall-return",
"exec",
+ "no-history",
NULL
};
diff --git a/gdb/mi/mi-common.h b/gdb/mi/mi-common.h
index 6a1aea3..dfb8353 100644
--- a/gdb/mi/mi-common.h
+++ b/gdb/mi/mi-common.h
@@ -42,6 +42,7 @@ enum async_reply_reason
EXEC_ASYNC_SYSCALL_ENTRY,
EXEC_ASYNC_SYSCALL_RETURN,
EXEC_ASYNC_EXEC,
+ EXEC_ASYNC_NO_HISTORY,
/* This is here only to represent the number of enums. */
EXEC_ASYNC_LAST
};
diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index e761ede..d631beb 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -159,7 +159,7 @@ proc test_controlled_execution_reverse {} {
"reverse-continue at callee3"
mi_execute_to "exec-continue --reverse" \
- "" "main" "" \
+ "no-history" "main" "" \
"basics.c" $line_main_body "" \
"reverse-continue at main"
}