--- infrun.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) --- a/infrun.c +++ b/infrun.c @@ -3558,10 +3558,21 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME ( keep_going (ecs); return; } - /* Normal (staticly linked) function call return. */ - init_sal (&sr_sal); - sr_sal.pc = ecs->stop_func_start; - insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id); + if (ecs->stop_func_start != stop_pc) + { + /* Normal (staticly linked) function call return. */ + init_sal (&sr_sal); + sr_sal.pc = ecs->stop_func_start; + insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id); + } + else + { + /* We are stepping over a function call in reverse, and + stop at the start address of the function. Go back to + single-stepping, which should take us back to the + function call. */ + ecs->event_thread->stepping_over_breakpoint = 1; + } } else insert_step_resume_breakpoint_at_caller (get_current_frame ());