From Fernando Nasser:
authorAndrew Cagney <cagney@redhat.com>
Thu, 28 Jun 2001 21:48:41 +0000 (21:48 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 28 Jun 2001 21:48:41 +0000 (21:48 +0000)
* infrun.c (handle_inferior_event): Handle "nexti" inside function
prologues.

gdb/ChangeLog
gdb/infrun.c

index 22de49948dbd0c4e55af246025395222b2be5ac0..06468ba7b0821f32dcd400dbf0b966b90f04ae56 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+       From Fernando Nasser:
+       * infrun.c (handle_inferior_event): Handle "nexti" inside function
+       prologues.
+       
 2001-06-28  Michael Snyder  <msnyder@redhat.com>
 
        * infrun.c (handle_inferior_event): Replace prev_pc test in all
index 972b0930a74497ccbbc3eba98d343c554f3ac7b9..e3556229473dfe477c3f89b92201c02ad8478865 100644 (file)
@@ -2755,11 +2755,16 @@ handle_inferior_event (struct execution_control_state *ecs)
       {
        /* It's a subroutine call.  */
 
-       if (step_over_calls == STEP_OVER_NONE)
+       if ((step_over_calls == STEP_OVER_NONE)
+           || ((step_range_end == 1)
+               && in_prologue (prev_pc, ecs->stop_func_start)))
          {
            /* I presume that step_over_calls is only 0 when we're
               supposed to be stepping at the assembly language level
               ("stepi").  Just stop.  */
+           /* Also, maybe we just did a "nexti" inside a prolog,
+               so we thought it was a subroutine call but it was not.
+               Stop as well.  FENN */
            stop_step = 1;
            print_stop_reason (END_STEPPING_RANGE, 0);
            stop_stepping (ecs);