diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index d2bd232..81614aa 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -296,8 +296,6 @@ int breakpoint_count; /* Pointer to current exception event record */ static struct exception_event_record *current_exception_event; -static int breakpoints_meant_to_be_inserted_p; - /* This function returns a pointer to the string representation of the pathname of the dynamically-linked library that has just been loaded. @@ -1237,8 +1235,6 @@ insert_breakpoints (void) struct ui_file *tmp_error_stream = mem_fileopen (); make_cleanup_ui_file_delete (tmp_error_stream); - breakpoints_meant_to_be_inserted_p = 1; - /* Explicitly mark the warning -- this will only be printed if there was an error. */ fprintf_unfiltered (tmp_error_stream, "Warning:\n"); @@ -1303,8 +1299,6 @@ remove_breakpoints (void) struct bp_location *b; int val; - breakpoints_meant_to_be_inserted_p = 0; - ALL_BP_LOCATIONS (b) { if (b->inserted) @@ -1318,12 +1312,6 @@ remove_breakpoints (void) } int -breakpoints_meant_to_be_inserted (void) -{ - return breakpoints_meant_to_be_inserted_p; -} - -int remove_hw_watchpoints (void) { struct bp_location *b; diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 236cd7b..e4aa72a 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -854,11 +854,4 @@ extern int deprecated_remove_raw_breakpoint (void *); target. */ int watchpoints_triggered (struct target_waitstatus *); -/* Returns non-zero if insert_breakpoints was previously called, - and remove_breakpoints was not called after that. - This function allows to figure out if we meant that all breakpoints - be inserted in inferior. If so, any new breakpoints possibly - created must be inserted as well. */ -extern int breakpoints_meant_to_be_inserted (void); - #endif /* !defined (BREAKPOINT_H) */ diff --git a/gdb/infrun.c b/gdb/infrun.c index 9a1c24f..08b0cf3 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1324,7 +1324,6 @@ handle_inferior_event (struct execution_control_state *ecs) /* Remove breakpoints, SOLIB_ADD might adjust breakpoint addresses via breakpoint_re_set. */ - breakpoints_were_inserted = breakpoints_meant_to_be_inserted (); remove_breakpoints (); /* Check for any newly added shared libraries if we're @@ -1368,8 +1367,7 @@ handle_inferior_event (struct execution_control_state *ecs) for "catch load". */ /* Reinsert breakpoints and continue. */ - if (breakpoints_were_inserted) - insert_breakpoints (); + insert_breakpoints (); } /* If we are skipping through a shell, or through shared library @@ -2847,8 +2845,6 @@ insert_step_resume_breakpoint_at_sal (struct symtab_and_line sr_sal, step_resume_breakpoint = set_momentary_breakpoint (sr_sal, sr_id, bp_step_resume); - if (breakpoints_meant_to_be_inserted ()) - insert_breakpoints (); } /* Insert a "step-resume breakpoint" at RETURN_FRAME.pc. This is used