aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorBruno Larsen <blarsen@redhat.com>2023-01-02 14:35:50 +0100
committerBruno Larsen <blarsen@redhat.com>2023-01-06 10:51:50 +0100
commit37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca (patch)
tree0cf886601fb04de161f8417f6363cf7e561728e4 /gdb/mi
parent695e9773786d79f191e9487a88d3b39a57d9c7e7 (diff)
downloadgdb-37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca.zip
gdb-37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca.tar.gz
gdb-37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca.tar.bz2
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
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-common.c1
-rw-r--r--gdb/mi/mi-common.h1
2 files changed, 2 insertions, 0 deletions
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
};