summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2015-09-04 10:33:05 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2015-09-17 14:11:39 +0200
commit4bc9aa64e637f4ca8ab4313a4cad4e1df9278736 (patch)
tree433a5731ef8a79e674b0d6d87f4a87a61b4a53cd
parentab6cda6e784a92028056be8c61235ca9011de113 (diff)
downloadbinutils-gdb-4bc9aa64e637f4ca8ab4313a4cad4e1df9278736.tar.gz
btrace: add missing NO_HISTORY
If a single-step ended right at the end of the execution history, we forgot to announce that. Fix it. Signed-off-by: Markus Metzger <markus.t.metzger@intel.com> gdb/ * record-btrace.c (record_btrace_single_step_forward): Return NO_HISTORY if a step brings us to the end of the execution history.
-rw-r--r--gdb/record-btrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 5e8c1d40285..fcd4351f6b6 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2061,7 +2061,10 @@ record_btrace_single_step_forward (struct thread_info *tp)
/* We stop replaying if we reached the end of the trace. */
if (btrace_insn_cmp (replay, &end) == 0)
- record_btrace_stop_replaying (tp);
+ {
+ record_btrace_stop_replaying (tp);
+ return btrace_step_no_history ();
+ }
return btrace_step_spurious ();
}