"to step over breakpoints is %s.\n"), value);
}
-/* Return true if the gdbarch implements the required methods to use
- displaced stepping. */
+/* Return true if the target behing THREAD supports displaced stepping. */
static bool
-gdbarch_supports_displaced_stepping (gdbarch *arch)
+target_supports_displaced_stepping (thread_info *thread)
{
- /* Only check for the presence of `prepare`. `finish` is required by the
- gdbarch verification to be provided if `prepare` is provided. */
- return gdbarch_displaced_step_prepare_p (arch);
+ inferior *inf = thread->inf;
+ target_ops *target = inf->top_target ();
+
+ return target->supports_displaced_step (thread);
}
/* Return non-zero if displaced stepping can/should be used to step
&& !target_is_non_stop_p ())
return false;
- gdbarch *gdbarch = get_thread_regcache (tp)->arch ();
-
- /* If the architecture doesn't implement displaced stepping, don't use
- it. */
- if (!gdbarch_supports_displaced_stepping (gdbarch))
+ /* If the target doesn't support displaced stepping, don't use it. */
+ if (!target_supports_displaced_stepping (tp))
return false;
/* If recording, don't use displaced stepping. */
displaced_step_thread_state *thread_disp_step_state
= get_displaced_stepping_state (tp);
- /* We should never reach this function if the architecture does not
+ /* We should never reach this function if the target does not
support displaced stepping. */
- gdb_assert (gdbarch_supports_displaced_stepping (gdbarch));
+ gdb_assert (target_supports_displaced_stepping (tp));
/* Nor if the thread isn't meant to step over a breakpoint. */
gdb_assert (tp->control.trap_expected);