19#if !defined (BREAKPOINT_H)
26#include "gdbsupport/break-common.h"
30#include "gdbsupport/array-view.h"
31#include "gdbsupport/filtered-iterator.h"
32#include "gdbsupport/function-view.h"
33#include "gdbsupport/next-iterator.h"
34#include "gdbsupport/iterator-range.h"
35#include "gdbsupport/refcounted-object.h"
36#include "gdbsupport/safe-iterator.h"
78#define BREAKPOINT_MAX 16
324class bp_location :
public refcounted_object,
public intrusive_list_node<bp_location>
528 gdb_assert (
loc->refcount () > 0);
530 if (
loc->refcount () == 0)
536typedef gdb::ref_ptr<bp_location, bp_location_ref_policy>
584 gdb::unique_xmalloc_ptr<char>,
585 gdb::unique_xmalloc_ptr<char>,
587 int, int, int, int, unsigned);
625 bool temp =
true,
const char *
cond_string =
nullptr);
922 gdb::array_view<const symtab_and_line> sals,
924 gdb::unique_xmalloc_ptr<char>
filter,
930 int enabled,
unsigned flags,
1173 bpstat *stop_chain =
nullptr);
1442 CORE_ADDR addr, ULONGEST len);
1489 gdb::array_view<const symtab_and_line> sals,
1490 gdb::array_view<const symtab_and_line> sals_end);
1540#define CATCH_PERMANENT ((void *) (uintptr_t) 0)
1541#define CATCH_TEMPORARY ((void *) (uintptr_t) 1)
1551 void *user_data_catch,
1552 void *user_data_tcatch);
1563 (
int internal, std::unique_ptr<breakpoint> &&b,
int update_gll);
1610 const char *cond_string,
int thread,
1612 const char *extra_string,
1613 bool force_condition,
1615 int tempflag,
enum bptype wanted_type,
1621 int internal,
unsigned flags);
1837 const gdb_byte *writebuf_org,
1838 ULONGEST memaddr, LONGEST len);
1861 int from_tty,
bool force);
1869 int from_tty,
bool force);
1945 = filtered_iterator<breakpoint_iterator, tracepoint_filter>;
2005 const char *regex,
bool tempflag,
std::unique_ptr< agent_expr > agent_expr_up
static enum auto_boolean pending_break_support
void print_breakpoint(breakpoint *bp)
void breakpoint_program_space_exit(struct program_space *pspace)
void breakpoint_re_set(void)
struct breakpoint * create_solib_event_breakpoint(struct gdbarch *, CORE_ADDR)
int user_breakpoint_p(struct breakpoint *)
const std::vector< bp_location * > & all_bp_locations()
void check_longjmp_breakpoint_for_call_dummy(struct thread_info *tp)
void remove_solib_event_breakpoints_at_next_stop(void)
void breakpoint_retire_moribund(void)
void enable_disable_bp_location(bp_location *loc, bool enable)
int insert_single_step_breakpoints(struct gdbarch *)
iterator_range< bp_location_iterator > bp_location_range
void disable_display(int)
void breakpoint_set_thread(struct breakpoint *b, int thread)
void remove_jit_event_breakpoints(void)
void breakpoint_re_set_thread(struct breakpoint *)
void breakpoint_set_inferior(struct breakpoint *b, int inferior)
struct breakpoint * get_breakpoint(int num)
void bpstat_run_callbacks(bpstat *bs_head)
int software_breakpoint_inserted_here_p(const address_space *, CORE_ADDR)
void insert_single_step_breakpoint(struct gdbarch *, const address_space *, CORE_ADDR)
struct breakpoint * clone_momentary_breakpoint(struct breakpoint *bpkt)
void add_solib_catchpoint(const char *arg, bool is_load, bool is_temp, bool enabled)
bool fix_breakpoint_script_output_globally
bool is_breakpoint(const struct breakpoint *bpt)
int remove_breakpoints(void)
@ BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
@ BPSTAT_WHAT_STOP_SILENT
@ BPSTAT_WHAT_SET_LONGJMP_RESUME
@ BPSTAT_WHAT_HP_STEP_RESUME
@ BPSTAT_WHAT_STEP_RESUME
@ BPSTAT_WHAT_KEEP_CHECKING
int breakpoints_should_be_inserted_now(void)
bool bpstat_should_step()
int detach_breakpoints(ptid_t ptid)
bp_location_list::iterator bp_location_iterator
bool bpstat_explains_signal(bpstat *, enum gdb_signal)
void set_std_terminate_breakpoint(void)
int bpstat_num(bpstat **, int *)
void watch_command_wrapper(const char *, int, bool)
int pending_breakpoint_p(struct breakpoint *)
iterator_range< tracepoint_iterator > tracepoint_range
void add_catch_command(const char *name, const char *docstring, cmd_func_ftype *func, completer_ftype *completer, void *user_data_catch, void *user_data_tcatch)
int create_breakpoint(struct gdbarch *gdbarch, struct location_spec *locspec, const char *cond_string, int thread, int inferior, const char *extra_string, bool force_condition, int parse_extra, int tempflag, enum bptype wanted_type, int ignore_count, enum auto_boolean pending_break_support, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
void enable_breakpoint(struct breakpoint *)
const char * bpdisp_text(enum bpdisp disp)
const struct breakpoint_ops code_breakpoint_ops
int watchpoints_triggered(const target_waitstatus &)
void enable_breakpoints_after_startup(void)
bool fix_multi_location_breakpoint_output_globally
bool is_watchpoint(const struct breakpoint *bpt)
enum breakpoint_here breakpoint_here_p(const address_space *, CORE_ADDR)
int breakpoint_inserted_here_p(const address_space *, CORE_ADDR)
enum command_control_type commands_from_control_command(const char *arg, struct command_line *cmd)
struct tracepoint * get_tracepoint_by_number_on_target(int num)
void delete_std_terminate_breakpoint(void)
@ bp_gnu_ifunc_resolver_return
@ bp_std_terminate_master
@ bp_static_marker_tracepoint
void bpstat_clear_actions(void)
@ CREATE_BREAKPOINT_FLAGS_INSERTED
void break_command(const char *, int)
void bpstat_clear(bpstat **)
void delete_breakpoint(struct breakpoint *)
struct command_line * breakpoint_commands(struct breakpoint *b)
void breakpoint_set_silent(struct breakpoint *b, int silent)
std::unique_ptr< struct breakpoint, breakpoint_deleter > breakpoint_up
cmd_list_element * commands_cmd_element
void bpstat_do_actions(void)
void remove_breakpoints_inf(inferior *inf)
void breakpoint_free_objfile(struct objfile *objfile)
void disable_current_display(void)
void remove_solib_event_breakpoints(void)
intrusive_list< bp_location > bp_location_list
breakpoint_up set_momentary_breakpoint(struct gdbarch *, struct symtab_and_line, struct frame_id, enum bptype)
void tbreak_command(const char *, int)
void rwatch_command_wrapper(const char *, int, bool)
int pc_at_non_inline_function(const address_space *aspace, CORE_ADDR pc, const target_waitstatus &ws)
int single_step_breakpoint_inserted_here_p(const address_space *, CORE_ADDR)
int hardware_breakpoint_inserted_here_p(const address_space *, CORE_ADDR)
bpstat * bpstat_stop_status_nowatch(const address_space *aspace, CORE_ADDR bp_addr, thread_info *thread, const target_waitstatus &ws)
bpstat * bpstat_stop_status(const address_space *aspace, CORE_ADDR pc, thread_info *thread, const target_waitstatus &ws, bpstat *stop_chain=nullptr)
int breakpoint_in_range_p(const address_space *aspace, CORE_ADDR addr, ULONGEST len)
bpstat * bpstat_copy(bpstat *)
int catch_syscall_enabled(void)
void breakpoint_set_task(struct breakpoint *b, int task)
bpstat * build_bpstat_chain(const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
void disable_breakpoints_before_startup(void)
void enable_watchpoints_after_interactive_call_stop(void)
intrusive_list< breakpoint > breakpoint_list
bool is_exception_catchpoint(breakpoint *bp)
void breakpoint_set_commands(struct breakpoint *b, counted_command_line &&commands)
void notify_breakpoint_modified(breakpoint *b)
struct tracepoint * get_tracepoint(int num)
void catch_exception_event(enum exception_event_kind ex_event, const char *regex, bool tempflag, int from_tty)
void breakpoint_auto_delete(bpstat *)
int breakpoint_has_location_inserted_here(struct breakpoint *bp, const address_space *aspace, CORE_ADDR pc)
void print_solib_event(bool is_catchpoint)
struct breakpoint * set_longjmp_breakpoint_for_call_dummy(void)
void clear_displays(void)
void until_break_command(const char *, int, int)
void breakpoint_init_inferior(enum inf_context)
bool target_exact_watchpoints
breakpoint_up set_momentary_breakpoint_at_pc(struct gdbarch *, CORE_ADDR pc, enum bptype type)
std::vector< breakpoint * > static_tracepoints_here(CORE_ADDR addr)
@ ordinary_breakpoint_here
@ permanent_breakpoint_here
void clear_breakpoint_hit_counts(void)
bool catching_syscall_number(int syscall_number)
int breakpoint_address_match(const address_space *aspace1, CORE_ADDR addr1, const address_space *aspace2, CORE_ADDR addr2)
void disable_watchpoints_before_interactive_call_start(void)
void set_breakpoint_condition(struct breakpoint *b, const char *exp, int from_tty, bool force)
breakpoint * install_breakpoint(int internal, std::unique_ptr< breakpoint > &&b, int update_gll)
bool bpstat_causes_stop(bpstat *)
struct breakpoint * create_and_insert_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
breakpoint_list::iterator breakpoint_iterator
void breakpoint_xfer_memory(gdb_byte *readbuf, gdb_byte *writebuf, const gdb_byte *writebuf_org, ULONGEST memaddr, LONGEST len)
void disable_breakpoints_in_shlibs(void)
void disable_breakpoint(struct breakpoint *)
const char * ep_parse_optional_if_clause(const char **arg)
void mark_breakpoints_out(void)
void delete_longjmp_breakpoint_at_next_stop(int thread)
bool is_tracepoint(const struct breakpoint *b)
@ bp_loc_hardware_breakpoint
@ bp_loc_software_breakpoint
@ bp_loc_software_watchpoint
@ bp_loc_hardware_watchpoint
void insert_breakpoints(void)
basic_safe_range< breakpoint_range > breakpoint_safe_range
struct gdbarch * get_sal_arch(struct symtab_and_line sal)
void delete_longjmp_breakpoint(int thread)
void update_breakpoints_after_exec(void)
int moribund_breakpoint_here_p(const address_space *, CORE_ADDR)
filtered_iterator< breakpoint_iterator, tracepoint_filter > tracepoint_iterator
enum print_stop_action bpstat_print(bpstat *bs, target_waitkind kind)
void update_breakpoint_locations(code_breakpoint *b, struct program_space *filter_pspace, gdb::array_view< const symtab_and_line > sals, gdb::array_view< const symtab_and_line > sals_end)
void set_longjmp_breakpoint(struct thread_info *tp, struct frame_id frame)
int hardware_watchpoint_inserted_in_range(const address_space *, CORE_ADDR addr, ULONGEST len)
void print_num_locno(const bpstat *bs, struct ui_out *)
int bpstat_locno(const bpstat *bs)
tracepoint_range all_tracepoints()
const struct breakpoint_ops * breakpoint_ops_for_location_spec(const location_spec *locspec, bool is_tracepoint)
void disable_overlay_breakpoints(void)
void describe_other_breakpoints(struct gdbarch *, struct program_space *, CORE_ADDR, struct obj_section *, int)
bpstat * bpstat_find_breakpoint(bpstat *, struct breakpoint *)
@ watch_triggered_unknown
struct breakpoint * create_jit_event_breakpoint(struct gdbarch *, CORE_ADDR)
iterator_range< breakpoint_iterator > breakpoint_range
bool is_catchpoint(struct breakpoint *b)
struct tracepoint * get_tracepoint_by_number(const char **arg, number_or_range_parser *parser)
breakpoint_safe_range all_breakpoints_safe()
gdb::ref_ptr< bp_location, bp_location_ref_policy > bp_location_ref_ptr
void enable_overlay_breakpoints(void)
struct breakpoint * create_thread_event_breakpoint(struct gdbarch *, CORE_ADDR)
void set_ignore_count(int, int, int)
breakpoint_range all_breakpoints()
void maybe_print_thread_hit_breakpoint(struct ui_out *uiout)
void awatch_command_wrapper(const char *, int, bool)
const minimal_symbol * msymbol
CORE_ADDR requested_address
virtual ~bp_location()=default
bp_target_info overlay_target_info
CORE_ADDR related_address
agent_expr_up cond_bytecode
gdb::unique_xmalloc_ptr< char > function_name
bp_location(breakpoint *owner)
int events_till_retirement
agent_expr_up cmd_bytecode
std::string to_string() const
condition_status condition_changed
target_hw_bp_type watchpoint_type
scoped_rbreak_breakpoints()
~scoped_rbreak_breakpoints()
DISABLE_COPY_AND_ASSIGN(scoped_rbreak_breakpoints)
std::shared_ptr< command_line > counted_command_line
void completer_ftype(struct cmd_list_element *, completion_tracker &tracker, const char *text, const char *word)
void cmd_func_ftype(const char *args, int from_tty, cmd_list_element *c)
std::unique_ptr< expression > expression_up
const struct frame_id null_frame_id
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
std::unique_ptr< location_spec > location_spec_up
void(* func)(remote_target *remote, char *)
static void incref(bp_location *loc)
static void decref(bp_location *loc)
std::vector< agent_expr * > conditions
std::vector< agent_expr * > tcommands
gdb_byte shadow_contents[BREAKPOINT_MAX]
struct address_space * placed_address_space
enum stop_stack_kind call_dummy
enum bpstat_what_main_action main_action
bp_location_ref_ptr bp_location_at
enum bp_print_how print_it
bpstat & operator=(const bpstat &)=delete
counted_command_line commands
struct breakpoint * breakpoint_at
void operator()(struct breakpoint *b) const
void(* create_sals_from_location_spec)(location_spec *locspec, struct linespec_result *canonical)
void(* create_breakpoints_sal)(struct gdbarch *, struct linespec_result *, gdb::unique_xmalloc_ptr< char >, gdb::unique_xmalloc_ptr< char >, enum bptype, enum bpdisp, int, int, int, int, int, int, int, unsigned)
counted_command_line commands
virtual int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
breakpoint(struct gdbarch *gdbarch_, enum bptype bptype, bool temp=true, const char *cond_string=nullptr)
bp_location_list steal_locations(program_space *pspace)
bp_location_list m_locations
virtual void print_recreate(struct ui_file *fp) const
const bp_location & first_loc() const
virtual int resources_needed(const struct bp_location *)
bp_location_range locations() const
virtual void check_status(struct bpstat *bs)
gdb::unique_xmalloc_ptr< char > cond_string
gdbpy_breakpoint_object * py_bp_object
void print_recreate_thread(struct ui_file *fp) const
virtual int insert_location(struct bp_location *)
DISABLE_COPY_AND_ASSIGN(breakpoint)
virtual enum print_stop_action print_it(const bpstat *bs) const
breakpoint * related_breakpoint
bool has_locations() const
virtual struct bp_location * allocate_location()
gdb::unique_xmalloc_ptr< char > filter
gdbscm_breakpoint_object * scm_bp_object
bp_location & first_loc()
void unadd_location(bp_location &loc)
virtual bool print_one(const bp_location **) const
virtual bool explains_signal(enum gdb_signal)
bool has_multiple_locations() const
virtual int remove_location(struct bp_location *, enum remove_bp_reason reason)
virtual void print_one_detail(struct ui_out *) const
void add_location(bp_location &loc)
virtual void print_mention() const
gdb::unique_xmalloc_ptr< char > extra_string
bool has_single_location() const
const bp_location & last_loc() const
virtual void after_condition_true(struct bpstat *bs)
location_spec_up locspec_range_end
catchpoint(struct gdbarch *gdbarch, bool temp, const char *cond_string)
~code_breakpoint() override=0
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
virtual std::vector< symtab_and_line > decode_location_spec(location_spec *locspec, struct program_space *search_pspace)
bp_location * add_location(const symtab_and_line &sal)
int insert_location(struct bp_location *) override
std::vector< symtab_and_line > location_spec_to_sals(location_spec *locspec, struct program_space *search_pspace, int *found)
code_breakpoint(struct gdbarch *gdbarch, bptype type, gdb::array_view< const symtab_and_line > sals, location_spec_up &&locspec, gdb::unique_xmalloc_ptr< char > filter, gdb::unique_xmalloc_ptr< char > cond_string, gdb::unique_xmalloc_ptr< char > extra_string, enum bpdisp disposition, int thread, int task, int inferior, int ignore_count, int from_tty, int enabled, unsigned flags, int display_canonical)
int remove_location(struct bp_location *, enum remove_bp_reason reason) override
bool operator()(breakpoint &b)
std::string static_trace_marker_id
void print_recreate(struct ui_file *fp) const override
ULONGEST traceframe_usage
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
int static_trace_marker_id_idx
void print_one_detail(struct ui_out *uiout) const override
void print_mention() const override
int insert_location(struct bp_location *) override
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
void check_status(struct bpstat *bs) override
struct frame_id watchpoint_frame
int remove_location(struct bp_location *, enum remove_bp_reason reason) override
virtual bool works_in_software_mode() const
gdb::unique_xmalloc_ptr< char > exp_string
gdb::unique_xmalloc_ptr< char > exp_string_reparse
enum print_stop_action print_it(const bpstat *bs) const override
bool explains_signal(enum gdb_signal) override
void print_mention() const override
int resources_needed(const struct bp_location *) override
const struct block * exp_valid_block
const struct block * cond_exp_valid_block
void print_recreate(struct ui_file *fp) const override
enum watchpoint_triggered watchpoint_triggered
gdb::ref_ptr< struct value, value_ref_policy > value_ref_ptr