* infcmd.c (step_1, step_once): Look up the stepping range based
authorPedro Alves <palves@redhat.com>
Fri, 5 Dec 2008 22:38:10 +0000 (22:38 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 5 Dec 2008 22:38:10 +0000 (22:38 +0000)
on the current frame's PC, not on stop_pc.

gdb/ChangeLog
gdb/infcmd.c

index a0f27153b4261a4f331b67caee2ba939038da8bf..51affa8bc876389220473be205b045332f7149b5 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2008-12-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix compilation on 32-bit host configurations.
index 512bb3864b56c42c9167c953e0bea74f54ef9187..9bfe2d496cafa704bd02e553937673c97f4313d6 100644 (file)
@@ -812,12 +812,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"));
@@ -932,7 +935,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.  */
@@ -943,7 +949,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"));