struct btrace_insn_iterator *replay;
struct thread_info *tp;
- tp = find_thread_ptid (inferior_ptid);
+ tp = find_thread_ptid (regcache_get_ptid (regcache));
gdb_assert (tp != NULL);
replay = tp->btrace.replay;
struct target_ops *t;
if (!record_btrace_generating_corefile
- && record_btrace_is_replaying (ops, inferior_ptid))
+ && record_btrace_is_replaying (ops, regcache_get_ptid (regcache)))
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, inferior_ptid))
+ && record_btrace_is_replaying (ops, regcache_get_ptid (regcache)))
return;
t = ops->beneath;