--- infrun.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/infrun.c +++ b/infrun.c @@ -3397,7 +3397,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME ( beyond the step range, and NOT the address of the last instruction within it! */ if (stop_pc >= ecs->event_thread->step_range_start - && stop_pc < ecs->event_thread->step_range_end) + && stop_pc < ecs->event_thread->step_range_end + && (frame_id_eq (get_frame_id (get_current_frame ()), + ecs->event_thread->step_frame_id) + || execution_direction != EXEC_REVERSE)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [0x%s-0x%s]\n",