#include "value.h"
#include "vec.h"
-#include "gdb-events.h"
-
struct value;
struct block;
/* Type of hardware watchpoint. */
enum target_hw_bp_type watchpoint_type;
- /* For any breakpoint type with an address, this is the BFD section
+ /* For any breakpoint type with an address, this is the section
associated with the address. Used primarily for overlay debugging. */
- asection *section;
+ struct obj_section *section;
/* Address at which breakpoint was requested, either by the user or
by GDB for internal breakpoints. This will usually be the same
/* Similarly, for the breakpoint at an overlay's LMA, if necessary. */
struct bp_target_info overlay_target_info;
+
+ /* In a non-stop mode, it's possible that we delete a breakpoint,
+ but as we do that, some still running thread hits that breakpoint.
+ For that reason, we need to keep locations belonging to deleted
+ breakpoints for a bit, so that don't report unexpected SIGTRAP.
+ We can't keep such locations forever, so we use a heuristic --
+ after we process certain number of inferior events since
+ breakpoint was deleted, we retire all locations of that breakpoint.
+ This variable keeps a number of events still to go, when
+ it becomes 0 this location is retired. */
+ int events_till_retirement;
};
/* This structure is a collection of function pointers that, if available,
/* Process id of a child process whose forking triggered this
catchpoint. This field is only valid immediately after this
catchpoint has triggered. */
- int forked_inferior_pid;
+ ptid_t forked_inferior_pid;
/* Filename of a program whose exec triggered this catchpoint.
This field is only valid immediately after this catchpoint has
BPSTAT_WHAT_KEEP_CHECKING. */
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME,
- /* Clear longjmp_resume breakpoint, then handle as BPSTAT_WHAT_SINGLE. */
- BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE,
-
/* Clear step resume breakpoint, and keep checking. */
BPSTAT_WHAT_STEP_RESUME,
Return 1 otherwise. */
extern int bpstat_num (bpstat *, int *);
-/* Perform actions associated with having stopped at *BSP. Actually, we just
- use this for breakpoint commands. Perhaps other actions will go here
- later, but this is executed at a late time (from the command loop). */
-extern void bpstat_do_actions (bpstat *);
+/* Perform actions associated with the stopped inferior. Actually, we
+ just use this for breakpoint commands. Perhaps other actions will
+ go here later, but this is executed at a late time (from the
+ command loop). */
+extern void bpstat_do_actions (void);
/* Modify BS so that the actions will not be performed. */
extern void bpstat_clear_actions (bpstat);
{
inf_starting,
inf_running,
- inf_exited
+ inf_exited,
+ inf_execd
};
/* The possible return values for breakpoint_here_p.
extern void breakpoint_re_set_thread (struct breakpoint *);
-extern int ep_is_exception_catchpoint (struct breakpoint *);
-
extern struct breakpoint *set_momentary_breakpoint
(struct symtab_and_line, struct frame_id, enum bptype);
+extern struct breakpoint *set_momentary_breakpoint_at_pc
+ (CORE_ADDR pc, enum bptype type);
+
extern void set_ignore_count (int, int, int);
extern void set_default_breakpoint (int, CORE_ADDR, struct symtab *, int);
extern struct cleanup *make_cleanup_delete_breakpoint (struct breakpoint *);
-extern struct cleanup *make_exec_cleanup_delete_breakpoint (struct breakpoint *);
-
extern void delete_breakpoint (struct breakpoint *);
extern void breakpoint_auto_delete (bpstat);
inferior_ptid. */
extern int detach_breakpoints (int);
-extern void enable_longjmp_breakpoint (void);
-extern void disable_longjmp_breakpoint (void);
+extern void set_longjmp_breakpoint (void);
+extern void delete_longjmp_breakpoint (int thread);
+
extern void enable_overlay_breakpoints (void);
extern void disable_overlay_breakpoints (void);
-extern void set_longjmp_resume_breakpoint (CORE_ADDR, struct frame_id);
/* These functions respectively disable or reenable all currently
enabled watchpoints. When disabled, the watchpoints are marked
call_disabled. When reenabled, they are marked enabled.
extern void enable_breakpoint (struct breakpoint *);
+/* Clear the "inserted" flag in all breakpoints. */
+extern void mark_breakpoints_out (void);
+
extern void make_breakpoint_permanent (struct breakpoint *);
extern struct breakpoint *create_solib_event_breakpoint (CORE_ADDR);
extern int breakpoints_always_inserted_mode (void);
+/* Called each time new event from target is processed.
+ Retires previously deleted breakpoint locations that
+ in our opinion won't ever trigger. */
+extern void breakpoint_retire_moribund (void);
+
#endif /* !defined (BREAKPOINT_H) */