/* Filter out requests that don't make sense during replay. */
if (replay_memory_access == replay_memory_access_read_only
&& !record_btrace_generating_corefile
- && record_btrace_is_replaying (ops, minus_one_ptid))
+ && record_btrace_is_replaying (ops, inferior_ptid))
{
switch (object)
{
struct target_ops *t;
if (!record_btrace_generating_corefile
- && record_btrace_is_replaying (ops, minus_one_ptid))
- error (_("This record target does not allow writing registers."));
+ && record_btrace_is_replaying (ops, inferior_ptid))
+ error (_("Cannot write registers while replaying."));
gdb_assert (may_write_registers != 0);
struct target_ops *t;
if (!record_btrace_generating_corefile
- && record_btrace_is_replaying (ops, minus_one_ptid))
+ && record_btrace_is_replaying (ops, inferior_ptid))
return;
t = ops->beneath;
/* ...and we stop replaying other threads if the thread to resume is not
replaying. */
if (!btrace_is_replaying (tp) && execution_direction != EXEC_REVERSE)
- ALL_NON_EXITED_THREADS (tp)
- record_btrace_stop_replaying (tp);
+ target_record_stop_replaying ();
}
/* As long as we're not replaying, just forward the request.
record_btrace_set_replay (tp, &it);
}
+/* The to_record_stop_replaying method of target record-btrace. */
+
+static void
+record_btrace_stop_replaying_all (struct target_ops *self)
+{
+ struct thread_info *tp;
+
+ ALL_NON_EXITED_THREADS (tp)
+ record_btrace_stop_replaying (tp);
+}
+
/* The to_execution_direction target method. */
static enum exec_direction_kind
ops->to_call_history_from = record_btrace_call_history_from;
ops->to_call_history_range = record_btrace_call_history_range;
ops->to_record_is_replaying = record_btrace_is_replaying;
+ ops->to_record_stop_replaying = record_btrace_stop_replaying_all;
ops->to_xfer_partial = record_btrace_xfer_partial;
ops->to_remove_breakpoint = record_btrace_remove_breakpoint;
ops->to_insert_breakpoint = record_btrace_insert_breakpoint;