aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index f4a5628..351e1a9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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. */