aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-31 14:31:16 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-31 14:31:16 +0000
commit8bea4e01db202d301348221cff486a4fe78e86a1 (patch)
tree3216998baf58a7ef6af662db999fd51d92a5365a /gdb/breakpoint.h
parent7a321525ff614c750174eb62b6204e6e7e29311d (diff)
downloadgdb-8bea4e01db202d301348221cff486a4fe78e86a1.zip
gdb-8bea4e01db202d301348221cff486a4fe78e86a1.tar.gz
gdb-8bea4e01db202d301348221cff486a4fe78e86a1.tar.bz2
* 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.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 6731e68..d8fe047 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -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