From 37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca Mon Sep 17 00:00:00 2001 From: Bruno Larsen Date: Mon, 2 Jan 2023 14:35:50 +0100 Subject: gdb/mi: add no-history stop reason When executing in reverse and runs out of recorded history, GDB prints a warning to the user, but does not add a reason in the stopped record, for example: *stopped,frame={addr="0x000000000040113e",func="main",args=[],file="/home/blarsen/Documents/fsf_build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.reverse/solib-reverse.c",fullname="/home/blarsen/Documents/binutils-gdb/gdb/testsuite/gdb.reverse/solib-reverse.c",line="27",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="1" This problem was reported as record/29260. This commit adds the reason no-history to the record, making it easier for interfaces using the mi interpreter to report the result. It also changes the test gdb.mi/mi-reverse.exp to test that the reason shows up correctly. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29260 --- gdb/doc/gdb.texinfo | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/doc') 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 -- cgit v1.1