From: Pedro Alves Date: Tue, 16 Dec 2008 22:36:44 +0000 (+0000) Subject: Merge from head: X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0f14269a1f1b66b1734aae756dcdeb068a9640d;p=thirdparty%2Fbinutils-gdb.git Merge from head: 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. --- diff --git a/gdb/ChangeLog.mp b/gdb/ChangeLog.mp new file mode 100644 index 00000000000..d7cd53a1e85 --- /dev/null +++ b/gdb/ChangeLog.mp @@ -0,0 +1,7 @@ +2008-12-16 Pedro Alves + + Merge from head: + 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. diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 5d490165bd1..da1d39f30b5 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -929,12 +929,15 @@ step_1 (int skip_subroutines, int single_inst, char *count_string) 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")); @@ -1051,7 +1054,10 @@ step_once (int skip_subroutines, int single_inst, int count, int thread) 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. */ @@ -1062,7 +1068,7 @@ step_once (int skip_subroutines, int single_inst, int count, int thread) 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"));