diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-10-07 11:16:35 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-10-07 11:16:35 +0000 |
commit | cf3e377e61e7861677252feb4d06ba8fcea1e5c1 (patch) | |
tree | 7e1ed4681df30cfb29b5b0e98f5d8fa38e6f1999 /gdb/breakpoint.c | |
parent | f5ebb9ea78ef2e0613cf1d855aebeca513048456 (diff) | |
download | gdb-cf3e377e61e7861677252feb4d06ba8fcea1e5c1.zip gdb-cf3e377e61e7861677252feb4d06ba8fcea1e5c1.tar.gz gdb-cf3e377e61e7861677252feb4d06ba8fcea1e5c1.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 24 |
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; } |