diff options
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/breakpoint.c | 24 | ||||
-rw-r--r-- | gdb/breakpoint.h | 8 | ||||
-rw-r--r-- | gdb/corelow.c | 2 | ||||
-rw-r--r-- | gdb/inflow.c | 13 | ||||
-rw-r--r-- | gdb/infrun.c | 2 | ||||
-rw-r--r-- | gdb/remote-es.c | 2 |
7 files changed, 44 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7333f91..38a50f1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ Thu Oct 07 09:29:11 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + * 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. + +Thu Oct 07 09:29:11 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + * Makefile.in (REGEX, REGEX1): Always use our own version of regex.c to be consistent across hosts. * source.c (_initialize_source): Initialize regex to use grep 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; } diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 8317dd3..589915d 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -156,11 +156,8 @@ extern void bpstat_clear PARAMS ((bpstat *)); is part of the bpstat is copied as well. */ extern bpstat bpstat_copy PARAMS ((bpstat)); -/* Get a bpstat associated with having just stopped at address *PC - and frame address FRAME_ADDRESS. Update *PC to point at the - breakpoint (if we hit a breakpoint). */ /* FIXME: prototypes uses equivalence between FRAME_ADDR and CORE_ADDR */ -extern bpstat bpstat_stop_status PARAMS ((CORE_ADDR *, CORE_ADDR)); +extern bpstat bpstat_stop_status PARAMS ((CORE_ADDR *, CORE_ADDR, int)); /* This bpstat_what stuff tells wait_for_inferior what to do with a breakpoint (a challenging task). */ @@ -317,6 +314,9 @@ extern void mark_breakpoints_out PARAMS ((void)); extern void +breakpoint_init_inferior PARAMS ((void)); + +extern void delete_breakpoint PARAMS ((struct breakpoint *)); extern void diff --git a/gdb/corelow.c b/gdb/corelow.c index a30f2c3..1e803ef 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -291,7 +291,7 @@ core_files_info (t) } /* If mourn is being called in all the right places, this could be say - `gdb internal error' (since generic_mourn calls mark_breakpoints_out). */ + `gdb internal error' (since generic_mourn calls breakpoint_init_inferior). */ static int ignore (addr, contents) diff --git a/gdb/inflow.c b/gdb/inflow.c index fddfe84..b484466 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -469,7 +469,7 @@ generic_mourn_inferior () { inferior_pid = 0; attach_flag = 0; - mark_breakpoints_out (); + breakpoint_init_inferior (); registers_changed (); #ifdef CLEAR_DEFERRED_STORES @@ -478,15 +478,8 @@ generic_mourn_inferior () #endif reopen_exec_file (); - flush_cached_frames (); - if (target_has_stack) { - set_current_frame ( create_new_frame (read_register (FP_REGNUM), - read_pc ())); - select_frame (get_current_frame (), 0); - } else { - set_current_frame (0); - select_frame ((FRAME) 0, -1); - } + reinit_frame_cache (); + /* It is confusing to the user for ignore counts to stick around from previous runs of the inferior. So clear them. */ breakpoint_clear_ignore_counts (); diff --git a/gdb/infrun.c b/gdb/infrun.c index 409a768..3744733 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -447,7 +447,7 @@ init_wait_for_inferior () trap_expected_after_continue = 0; breakpoints_inserted = 0; - mark_breakpoints_out (); + breakpoint_init_inferior (); stop_signal = 0; /* Don't confuse first call to proceed(). */ } diff --git a/gdb/remote-es.c b/gdb/remote-es.c index e910816..66a62da 100644 --- a/gdb/remote-es.c +++ b/gdb/remote-es.c @@ -1430,7 +1430,7 @@ es1800_load (filename, from_tty) error ("Downloading format not defined\n"); } - mark_breakpoints_out (); + breakpoint_init_inferior (); inferior_pid = 0; if (from_tty) { |