summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-12-16 22:36:44 +0000
committerPedro Alves <pedro@codesourcery.com>2008-12-16 22:36:44 +0000
commitd75d95997936815092cfb4faf415b1d1616d99c2 (patch)
tree62de0f21fc71a858b054b6f1e3cf11b70fb6f9d3
parentaf7fc61dd603cc87508845709ef881c4386de3c0 (diff)
downloadgdb-d75d95997936815092cfb4faf415b1d1616d99c2.tar.gz
Merge from head:
2008-12-05 Pedro Alves <pedro@codesourcery.com> * infcmd.c (step_1, step_once): Look up the stepping range based on the current frame's PC, not on stop_pc.
-rw-r--r--gdb/ChangeLog.mp7
-rw-r--r--gdb/infcmd.c14
2 files changed, 17 insertions, 4 deletions
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 <pedro@codesourcery.com>
+
+ Merge from head:
+ 2008-12-05 Pedro Alves <pedro@codesourcery.com>
+
+ * 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"));