aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ee5cf54..2db3753 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -505,8 +505,7 @@ remove_breakpoints ()
return 0;
}
-/* Clear the "inserted" flag in all breakpoints.
- This is done when the inferior is loaded. */
+/* Clear the "inserted" flag in all breakpoints. */
void
mark_breakpoints_out ()
@@ -517,6 +516,26 @@ mark_breakpoints_out ()
b->inserted = 0;
}
+/* Clear the "inserted" flag in all breakpoints and delete any breakpoints
+ which should go away between runs of the program. */
+
+void
+breakpoint_init_inferior ()
+{
+ register struct breakpoint *b, *temp;
+
+ ALL_BREAKPOINTS_SAFE (b, temp)
+ {
+ b->inserted = 0;
+
+ /* If the call dummy breakpoint is at the entry point it will
+ cause problems when the inferior is rerun, so we better
+ get rid of it. */
+ if (b->type == bp_call_dummy)
+ delete_breakpoint (b);
+ }
+}
+
/* breakpoint_here_p (PC) returns 1 if an enabled breakpoint exists at PC.
When continuing from a location with a breakpoint,
we actually single step once before calling insert_breakpoints. */
@@ -2709,6 +2728,7 @@ breakpoint_re_set_one (bint)
case bp_finish:
case bp_longjmp:
case bp_longjmp_resume:
+ case bp_call_dummy:
delete_breakpoint (b);
break;
}