ChangeLog:
[deliverable/binutils-gdb.git] / gdb / infrun.c
index f4a562828cd2bc503d4bf54dc273247cc14b33c5..351e1a91c4b8a51cf94dbf954f2492a6ae6ab36e 100644 (file)
@@ -3165,6 +3165,7 @@ handle_inferior_event (struct execution_control_state *ecs)
       gdb_flush (gdb_stdout);
       target_mourn_inferior ();
       singlestep_breakpoints_inserted_p = 0;
+      cancel_single_step_breakpoints ();
       stop_print_frame = 0;
       stop_stepping (ecs);
       return;
@@ -3188,6 +3189,7 @@ handle_inferior_event (struct execution_control_state *ecs)
 
       print_stop_reason (SIGNAL_EXITED, ecs->ws.value.sig);
       singlestep_breakpoints_inserted_p = 0;
+      cancel_single_step_breakpoints ();
       stop_stepping (ecs);
       return;
 
@@ -3225,6 +3227,13 @@ handle_inferior_event (struct execution_control_state *ecs)
          detach_breakpoints (child_pid);
        }
 
+      if (singlestep_breakpoints_inserted_p)
+       {
+         /* Pull the single step breakpoints out of the target. */
+         remove_single_step_breakpoints ();
+         singlestep_breakpoints_inserted_p = 0;
+       }
+
       /* In case the event is caught by a catchpoint, remember that
         the event is to be followed at the next resume of the thread,
         and not immediately.  */
@@ -3314,6 +3323,9 @@ handle_inferior_event (struct execution_control_state *ecs)
          reinit_frame_cache ();
        }
 
+      singlestep_breakpoints_inserted_p = 0;
+      cancel_single_step_breakpoints ();
+
       stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
 
       /* Do whatever is necessary to the parent branch of the vfork.  */
This page took 0.026045 seconds and 4 git commands to generate.