dynamic libraries. */
bp_shlib_event,
+ /* Some multi-threaded systems can arrange for a location in the
+ inferior to be executed when certain thread-related events occur
+ (such as thread creation or thread death).
+
+ By placing a breakpoint at one of these locations, GDB will get
+ control when these events occur. GDB can then update its thread
+ lists etc. */
+
+ bp_thread_event,
+
/* These breakpoints are used to implement the "catch load" command
on platforms whose dynamic linkers support such functionality. */
bp_catch_load,
shlib_disabled, /* The eventpoint's address is in an unloaded solib.
The eventpoint will be automatically enabled
and reset when that solib is loaded. */
- call_disabled /* The eventpoint has been disabled while a call
+ call_disabled, /* The eventpoint has been disabled while a call
into the inferior is "in flight", because some
eventpoints interfere with the implementation of
a call on some targets. The eventpoint will be
automatically enabled and reset when the call
"lands" (either completes, or stops at another
eventpoint). */
+ 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
+ its value. Step over it using the architecture's
+ SKIP_INSN macro. */
};
int call_dummy;
};
+/* The possible return values for print_bpstat, print_it_normal,
+ print_it_done, print_it_noop. */
+enum print_stop_action
+ {
+ PRINT_UNKNOWN = -1,
+ PRINT_SRC_AND_LOC,
+ PRINT_SRC_ONLY,
+ PRINT_NOTHING
+ };
+
/* Tell what to do about this bpstat. */
struct bpstat_what bpstat_what PARAMS ((bpstat));
\f
/* Print a message indicating what happened. Returns nonzero to
say that only the source line should be printed after this (zero
return means print the frame as well as the source line). */
-extern int bpstat_print PARAMS ((bpstat));
+extern enum print_stop_action bpstat_print PARAMS ((bpstat));
/* Return the breakpoint number of the first breakpoint we are stopped
at. *BSP upon return is a bpstat which points to the remaining
extern void bpstat_get_triggered_catchpoints PARAMS ((bpstat, bpstat *));
/* Implementation: */
+
+/* Values used to tell the printing routine how to behave for this bpstat. */
+enum bp_print_how
+ {
+ /* This is used when we want to do a normal printing of the reason
+ for stopping. The output will depend on the type of eventpoint
+ we are dealing with. This is the default value, most commonly
+ used. */
+ print_it_normal,
+ /* This is used when nothing should be printed for this bpstat entry. */
+ print_it_noop,
+ /* This is used when everything which needs to be printed has
+ already been printed. But we still want to print the frame. */
+ print_it_done
+ };
+
struct bpstats
{
/* Linked list because there can be two breakpoints at the same
/* Nonzero if this breakpoint tells us to stop. */
char stop;
- /* Function called by bpstat_print to print stuff associated with
- this element of the bpstat chain. Returns 0 or 1 just like
- bpstat_print, or -1 if it can't deal with it. */
- int (*print_it) PARAMS ((bpstat bs));
+ /* Tell bpstat_print and print_bp_stop_message how to print stuff
+ associated with this element of the bpstat chain. */
+ enum bp_print_how print_it;
};
enum inf_context
inf_running,
inf_exited
};
+
+/* The possible return values for breakpoint_here_p.
+ We guarantee that zero always means "no breakpoint here". */
+enum breakpoint_here
+ {
+ no_breakpoint_here = 0,
+ ordinary_breakpoint_here,
+ permanent_breakpoint_here
+ };
\f
/* Prototypes for breakpoint-related functions. */
/* Forward declarations for prototypes */
struct frame_info;
-extern int breakpoint_here_p PARAMS ((CORE_ADDR));
+extern enum breakpoint_here breakpoint_here_p PARAMS ((CORE_ADDR));
extern int breakpoint_inserted_here_p PARAMS ((CORE_ADDR));
extern void breakpoint_init_inferior PARAMS ((enum inf_context));
+extern struct cleanup *make_cleanup_delete_breakpoint (struct breakpoint *);
+
+extern struct cleanup *make_exec_cleanup_delete_breakpoint (struct breakpoint *);
+
extern void delete_breakpoint PARAMS ((struct breakpoint *));
extern void breakpoint_auto_delete PARAMS ((bpstat));
extern void break_command PARAMS ((char *, int));
+extern void hbreak_command_wrapper PARAMS ((char *, int));
+extern void thbreak_command_wrapper PARAMS ((char *, int));
+extern void rbreak_command_wrapper PARAMS ((char *, int));
+extern void watch_command_wrapper PARAMS ((char *, int));
+extern void awatch_command_wrapper PARAMS ((char *, int));
+extern void rwatch_command_wrapper PARAMS ((char *, int));
extern void tbreak_command PARAMS ((char *, int));
extern int insert_breakpoints PARAMS ((void));
extern void clear_breakpoint_hit_counts PARAMS ((void));
+extern int get_number PARAMS ((char **));
+
+extern int get_number_or_range PARAMS ((char **));
+
/* The following are for displays, which aren't really breakpoints, but
here is as good a place as any for them. */
extern void enable_breakpoint PARAMS ((struct breakpoint *));
-extern void create_solib_event_breakpoint PARAMS ((CORE_ADDR));
+extern void make_breakpoint_permanent PARAMS ((struct breakpoint *));
+
+extern struct breakpoint *create_solib_event_breakpoint PARAMS ((CORE_ADDR));
+
+extern struct breakpoint *create_thread_event_breakpoint PARAMS ((CORE_ADDR));
extern void remove_solib_event_breakpoints PARAMS ((void));
+extern void remove_thread_event_breakpoints PARAMS ((void));
+
extern void disable_breakpoints_in_shlibs PARAMS ((int silent));
extern void re_enable_breakpoints_in_shlibs PARAMS ((void));
extern struct breakpoint *set_breakpoint_sal PARAMS ((struct symtab_and_line));
+/* Enable breakpoints and delete when hit. Called with ARG == NULL
+ deletes all breakpoints. */
+extern void delete_command (char *arg, int from_tty);
+
+/* Pull all H/W watchpoints from the target. Return non-zero if the
+ remove fails. */
+extern int remove_hw_watchpoints (void);
+
#endif /* !defined (BREAKPOINT_H) */