mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
that clears the `inserted' flag for all breakpoints and deletes any breakpoints which should go away between runs of programs. * inflow.c (generic_mourn_inferior), infrun.c (init_wait_for_inferior), remote-es.c (es1800_load), comments in exec.c and corelow.c: Use it instead of mark_breakpoints_out. * breakpoint.c (mark_breakpoints_out): Update comment, tm-rs6000.h uses it in a completely different context. * breakpoint.c (breakpoint_re_set_one): Add bp_call_dummy case.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user