--- infrun.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/infrun.c +++ b/infrun.c @@ -49,6 +49,8 @@ #include "mi/mi-common.h" #include "event-top.h" +#include "record.h" + /* Prototypes for local functions */ static void signals_info (char *, int); @@ -603,7 +605,8 @@ use_displaced_stepping (struct gdbarch * return (((can_use_displaced_stepping == can_use_displaced_stepping_auto && non_stop) || can_use_displaced_stepping == can_use_displaced_stepping_on) - && gdbarch_displaced_step_copy_insn_p (gdbarch)); + && gdbarch_displaced_step_copy_insn_p (gdbarch) + && current_target.to_stratum != record_stratum); } /* Clean out any stray displaced stepping state. */ @@ -2108,6 +2111,10 @@ adjust_pc_after_break (struct execution_ if (software_breakpoint_inserted_here_p (breakpoint_pc) || (non_stop && moribund_breakpoint_here_p (breakpoint_pc))) { + struct cleanup *old_cleanups = NULL; + if (current_target.to_stratum == record_stratum) + old_cleanups = record_gdb_operation_disable_set (); + /* When using hardware single-step, a SIGTRAP is reported for both a completed single-step and a software breakpoint. Need to differentiate between the two, as the latter needs adjusting @@ -2131,6 +2138,9 @@ adjust_pc_after_break (struct execution_ || !currently_stepping (ecs->event_thread) || ecs->event_thread->prev_pc == breakpoint_pc) regcache_write_pc (regcache, breakpoint_pc); + + if (current_target.to_stratum == record_stratum) + do_cleanups (old_cleanups); } }