+2015-09-18 Markus Metzger <markus.t.metzger@intel.com>
+
+ * record-btrace.c (record_btrace_step_thread): Move breakpoint check
+ to ...
+ (record_btrace_single_step_forward): ... here and
+ (record_btrace_single_step_backward): ... here.
+
2015-09-18 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (btrace_step_spurious)
if (replay == NULL)
return btrace_step_no_history ();
+ /* Check if we're stepping a breakpoint. */
+ if (record_btrace_replay_at_breakpoint (tp))
+ return btrace_step_stopped ();
+
/* Skip gaps during replay. */
do
{
}
while (btrace_insn_get (replay) == NULL);
+ /* Check if we're stepping a breakpoint.
+
+ For reverse-stepping, this check is after the step. There is logic in
+ infrun.c that handles reverse-stepping separately. See, for example,
+ proceed and adjust_pc_after_break.
+
+ This code assumes that for reverse-stepping, PC points to the last
+ de-executed instruction, whereas for forward-stepping PC points to the
+ next to-be-executed instruction. */
+ if (record_btrace_replay_at_breakpoint (tp))
+ return btrace_step_stopped ();
+
return btrace_step_spurious ();
}
target_pid_to_str (tp->ptid),
core_addr_to_string_nz (insn->pc));
}
-
- if (record_btrace_replay_at_breakpoint (tp))
- return btrace_step_stopped ();
}
case BTHR_RCONT:
DEBUG ("reverse-stepping %d (%s) ... %s", tp->num,
target_pid_to_str (tp->ptid),
core_addr_to_string_nz (insn->pc));
-
- if (record_btrace_replay_at_breakpoint (tp))
- return btrace_step_stopped ();
}
}
}