2008-12-05 Pedro Alves * infcmd.c (step_1, step_once): Look up the stepping range based on the current frame's PC, not on stop_pc. --- gdb/infcmd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Index: src/gdb/infcmd.c =================================================================== --- src.orig/gdb/infcmd.c 2008-12-05 20:03:59.000000000 +0000 +++ src/gdb/infcmd.c 2008-12-05 21:42:56.000000000 +0000 @@ -812,12 +812,15 @@ step_1 (int skip_subroutines, int single if (!single_inst) { - find_pc_line_pc_range (stop_pc, + CORE_ADDR pc; + + pc = get_frame_pc (frame); + find_pc_line_pc_range (pc, &tp->step_range_start, &tp->step_range_end); if (tp->step_range_end == 0) { char *name; - if (find_pc_partial_function (stop_pc, &name, + if (find_pc_partial_function (pc, &name, &tp->step_range_start, &tp->step_range_end) == 0) error (_("Cannot find bounds of current function")); @@ -932,7 +935,10 @@ step_once (int skip_subroutines, int sin if (!single_inst) { - find_pc_line_pc_range (stop_pc, + CORE_ADDR pc; + + pc = get_frame_pc (frame); + find_pc_line_pc_range (pc, &tp->step_range_start, &tp->step_range_end); /* If we have no line info, switch to stepi mode. */ @@ -943,7 +949,7 @@ step_once (int skip_subroutines, int sin else if (tp->step_range_end == 0) { char *name; - if (find_pc_partial_function (stop_pc, &name, + if (find_pc_partial_function (pc, &name, &tp->step_range_start, &tp->step_range_end) == 0) error (_("Cannot find bounds of current function"));