When we stop replaying a thread, it moves to the end of its execution
history. It retains its state from when it was replaying, though, so a
subsequent 'info program' command would show wrong information.
Clear all execution state used by the 'info program' command.
switch (tp->state)
{
case THREAD_STOPPED:
+ /* Forget why we stopped; it was at a different location. */
+ tp->set_stop_reason (TARGET_STOPPED_BY_NO_REASON);
+ tp->set_stop_signal (GDB_SIGNAL_0);
+ tp->control.stop_step = 0;
+
+ if (tp->has_pending_waitstatus ())
+ tp->clear_pending_waitstatus ();
+
+ bpstat_clear (&tp->control.stop_bpstat);
break;
case THREAD_RUNNING:
# Stop recording and try to step live (pr19340).
with_test_prefix "live" {
gdb_test "record stop" "Process record is stopped.*fun4\.4.*"
+ gdb_test "info program" [multi_line \
+ "Program stopped at $hex\." \
+ "Type \"info stack\" or \"info registers\" for more information\."]
gdb_test "reverse-next" "Reverse execution is not currently supported.*"
gdb_test "step" ".*fun3\.2.*"
}