* breakpoint.h (enum enable_state): Add bp_startup_disabled.

(disable_breakpoints_before_startup): Add prototype.
	(enable_breakpoints_after_startup): Likewise.

	* breakpoint.c (executing_startup): New static variable.
	(describe_other_breakpoints): Handle bp_startup_disabled.
	(check_duplicates_for): Likewise.
	(disable_breakpoints_before_startup): New function.
	(enable_breakpoints_after_startup): New function.
	(create_breakpoint): Mark new breakpoints as bp_startup_disabled
	if executing_startup flag is true.
	(break_command_really): Likewise.
	(breakpoint_re_set_one): Skip bp_startup_disabled breakpoints.
This commit is contained in:
Ulrich Weigand 2009-07-31 14:31:16 +00:00
parent 7a321525ff
commit 8bea4e01db
3 changed files with 102 additions and 1 deletions

View file

@ -135,6 +135,12 @@ enum enable_state
automatically enabled and reset when the call
"lands" (either completes, or stops at another
eventpoint). */
bp_startup_disabled,/* The eventpoint has been disabled during inferior
startup. This is necessary on some targets where
the main executable will get relocated during
startup, making breakpoint addresses invalid.
The eventpoint will be automatically enabled and
reset once inferior startup is complete. */
bp_permanent /* There is a breakpoint instruction hard-wired into
the target's code. Don't try to write another
breakpoint instruction on top of it, or restore
@ -810,6 +816,19 @@ extern void disable_watchpoints_before_interactive_call_start (void);
extern void enable_watchpoints_after_interactive_call_stop (void);
/* These functions disable and re-enable all breakpoints during
inferior startup. They are intended to be called from solib
code where necessary. This is needed on platforms where the
main executable is relocated at some point during startup
processing, making breakpoint addresses invalid.
If additional breakpoints are created after the routine
disable_breakpoints_before_startup but before the routine
enable_breakpoints_after_startup was called, they will also
be marked as disabled. */
extern void disable_breakpoints_before_startup (void);
extern void enable_breakpoints_after_startup (void);
/* For script interpreters that need to define breakpoint commands
after they've already read the commands into a struct command_line. */
extern enum command_control_type commands_from_control_command