static void mention (struct breakpoint *);
static struct breakpoint *set_raw_breakpoint_without_location (struct gdbarch *,
- enum bptype,
- const struct breakpoint_ops *);
+ enum bptype);
static struct bp_location *add_location_to_breakpoint (struct breakpoint *,
const struct symtab_and_line *);
static. */
static struct breakpoint *set_raw_breakpoint (struct gdbarch *gdbarch,
struct symtab_and_line,
- enum bptype,
- const struct breakpoint_ops *);
+ enum bptype);
static struct breakpoint *
momentary_breakpoint_from_master (struct breakpoint *orig,
enum bptype type,
- const struct breakpoint_ops *ops,
int loc_enabled);
static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
static struct breakpoint *
create_internal_breakpoint (struct gdbarch *gdbarch,
- CORE_ADDR address, enum bptype type,
- const struct breakpoint_ops *ops)
+ CORE_ADDR address, enum bptype type)
{
symtab_and_line sal;
sal.pc = address;
sal.section = find_pc_overlay (sal.pc);
sal.pspace = current_program_space;
- breakpoint *b = set_raw_breakpoint (gdbarch, sal, type, ops);
+ breakpoint *b = set_raw_breakpoint (gdbarch, sal, type);
b->number = internal_breakpoint_number--;
b->disposition = disp_donttouch;
addr = bp_objfile_data->overlay_msym.value_address ();
b = create_internal_breakpoint (objfile->arch (), addr,
- bp_overlay_event,
- &base_breakpoint_ops);
+ bp_overlay_event);
initialize_explicit_location (&explicit_loc);
explicit_loc.function_name = ASTRDUP (func_name);
b->location = new_explicit_location (&explicit_loc);
b = create_internal_breakpoint (gdbarch,
p->get_relocated_address (objfile),
- bp_longjmp_master,
- &base_breakpoint_ops);
+ bp_longjmp_master);
b->location = new_probe_location ("-probe-stap libc:longjmp");
b->enable_state = bp_disabled;
}
}
addr = bp_objfile_data->longjmp_msym[i].value_address ();
- b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master,
- &base_breakpoint_ops);
+ b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master);
initialize_explicit_location (&explicit_loc);
explicit_loc.function_name = ASTRDUP (func_name);
b->location = new_explicit_location (&explicit_loc);
addr = bp_objfile_data->terminate_msym.value_address ();
b = create_internal_breakpoint (objfile->arch (), addr,
- bp_std_terminate_master,
- &base_breakpoint_ops);
+ bp_std_terminate_master);
initialize_explicit_location (&explicit_loc);
explicit_loc.function_name = ASTRDUP (func_name);
b->location = new_explicit_location (&explicit_loc);
{
b = create_internal_breakpoint (gdbarch,
p->get_relocated_address (objfile),
- bp_exception_master,
- &base_breakpoint_ops);
+ bp_exception_master);
b->location = new_probe_location ("-probe-stap libgcc:unwind");
b->enable_state = bp_disabled;
}
addr = bp_objfile_data->exception_msym.value_address ();
addr = gdbarch_convert_from_func_ptr_addr
(gdbarch, addr, current_inferior ()->top_target ());
- b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
- &base_breakpoint_ops);
+ b = create_internal_breakpoint (gdbarch, addr, bp_exception_master);
initialize_explicit_location (&explicit_loc);
explicit_loc.function_name = ASTRDUP (func_name);
b->location = new_explicit_location (&explicit_loc);
static void
init_raw_breakpoint_without_location (struct breakpoint *b,
struct gdbarch *gdbarch,
- enum bptype bptype,
- const struct breakpoint_ops *ops)
+ enum bptype bptype)
{
- gdb_assert (ops != NULL);
-
- b->ops = ops;
b->type = bptype;
b->gdbarch = gdbarch;
b->language = current_language->la_language;
static struct breakpoint *
set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
- enum bptype bptype,
- const struct breakpoint_ops *ops)
+ enum bptype bptype)
{
std::unique_ptr<breakpoint> b = new_breakpoint_from_type (bptype);
- init_raw_breakpoint_without_location (b.get (), gdbarch, bptype, ops);
+ init_raw_breakpoint_without_location (b.get (), gdbarch, bptype);
return add_to_breakpoint_chain (std::move (b));
}
static void
init_raw_breakpoint (struct breakpoint *b, struct gdbarch *gdbarch,
- struct symtab_and_line sal, enum bptype bptype,
- const struct breakpoint_ops *ops)
+ struct symtab_and_line sal, enum bptype bptype)
{
- init_raw_breakpoint_without_location (b, gdbarch, bptype, ops);
+ init_raw_breakpoint_without_location (b, gdbarch, bptype);
add_location_to_breakpoint (b, &sal);
static struct breakpoint *
set_raw_breakpoint (struct gdbarch *gdbarch,
- struct symtab_and_line sal, enum bptype bptype,
- const struct breakpoint_ops *ops)
+ struct symtab_and_line sal, enum bptype bptype)
{
std::unique_ptr<breakpoint> b = new_breakpoint_from_type (bptype);
- init_raw_breakpoint (b.get (), gdbarch, sal, bptype, ops);
+ init_raw_breakpoint (b.get (), gdbarch, sal, bptype);
return add_to_breakpoint_chain (std::move (b));
}
/* longjmp_breakpoint_ops ensures INITIATING_FRAME is cleared again
after their removal. */
- clone = momentary_breakpoint_from_master (b, type,
- &base_breakpoint_ops, 1);
+ clone = momentary_breakpoint_from_master (b, type, 1);
clone->thread = thread;
}
struct breakpoint *new_b;
new_b = momentary_breakpoint_from_master (b, bp_longjmp_call_dummy,
- &base_breakpoint_ops,
1);
new_b->thread = inferior_thread ()->global_num;
if (b->pspace == current_program_space
&& b->type == bp_std_terminate_master)
{
- momentary_breakpoint_from_master (b, bp_std_terminate,
- &base_breakpoint_ops, 1);
+ momentary_breakpoint_from_master (b, bp_std_terminate, 1);
}
}
{
struct breakpoint *b;
- b = create_internal_breakpoint (gdbarch, address, bp_thread_event,
- &base_breakpoint_ops);
+ b = create_internal_breakpoint (gdbarch, address, bp_thread_event);
b->enable_state = bp_enabled;
/* location has to be used or breakpoint_re_set will delete me. */
struct breakpoint *
create_jit_event_breakpoint (struct gdbarch *gdbarch, CORE_ADDR address)
{
- return create_internal_breakpoint (gdbarch, address, bp_jit_event,
- &base_breakpoint_ops);
+ return create_internal_breakpoint (gdbarch, address, bp_jit_event);
}
/* Remove JIT code registration and unregistration breakpoint(s). */
{
struct breakpoint *b;
- b = create_internal_breakpoint (gdbarch, address, bp_shlib_event,
- &base_breakpoint_ops);
+ b = create_internal_breakpoint (gdbarch, address, bp_shlib_event);
update_global_location_list_nothrow (insert_mode);
return b;
}
symtab_and_line sal;
sal.pspace = current_program_space;
- init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint,
- &base_breakpoint_ops);
+ init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint);
if (cond_string == nullptr)
b->cond_string.reset ();
{
std::unique_ptr<breakpoint> b (new momentary_breakpoint ());
- init_raw_breakpoint_without_location (b.get (), gdbarch, bp_single_step,
- &base_breakpoint_ops);
+ init_raw_breakpoint_without_location (b.get (), gdbarch, bp_single_step);
b->disposition = disp_donttouch;
b->frame_id = null_frame_id;
tail-called one. */
gdb_assert (!frame_id_artificial_p (frame_id));
- b = set_raw_breakpoint (gdbarch, sal, type, &base_breakpoint_ops);
+ b = set_raw_breakpoint (gdbarch, sal, type);
b->enable_state = bp_enabled;
b->disposition = disp_donttouch;
b->frame_id = frame_id;
static struct breakpoint *
momentary_breakpoint_from_master (struct breakpoint *orig,
enum bptype type,
- const struct breakpoint_ops *ops,
int loc_enabled)
{
struct breakpoint *copy;
- copy = set_raw_breakpoint_without_location (orig->gdbarch, type, ops);
+ copy = set_raw_breakpoint_without_location (orig->gdbarch, type);
copy->loc = copy->allocate_location ();
set_breakpoint_location_function (copy->loc);
if (orig == NULL)
return NULL;
- gdb_assert (orig->ops == &base_breakpoint_ops);
- return momentary_breakpoint_from_master (orig, orig->type, orig->ops, 0);
+ return momentary_breakpoint_from_master (orig, orig->type, 0);
}
breakpoint_up
if (&sal == &sals[0])
{
- init_raw_breakpoint (b, gdbarch, sal, type, ops);
+ init_raw_breakpoint (b, gdbarch, sal, type);
b->thread = thread;
b->task = task;
{
std::unique_ptr <breakpoint> b = new_breakpoint_from_type (type_wanted);
- init_raw_breakpoint_without_location (b.get (), gdbarch, type_wanted, ops);
+ init_raw_breakpoint_without_location (b.get (), gdbarch, type_wanted);
b->location = copy_event_location (location);
if (parse_extra)
/* Now set up the breakpoint. */
std::unique_ptr<breakpoint> br (new ranged_breakpoint ());
init_raw_breakpoint (br.get (), get_current_arch (),
- sal_start, bp_hardware_breakpoint,
- &base_breakpoint_ops);
+ sal_start, bp_hardware_breakpoint);
b = add_to_breakpoint_chain (std::move (br));
set_breakpoint_count (breakpoint_count + 1);
scope_breakpoint
= create_internal_breakpoint (caller_arch, caller_pc,
- bp_watchpoint_scope,
- &base_breakpoint_ops);
+ bp_watchpoint_scope);
/* create_internal_breakpoint could invalidate WP_FRAME. */
wp_frame = NULL;
w.reset (new masked_watchpoint ());
else
w.reset (new watchpoint ());
- init_raw_breakpoint_without_location (w.get (), nullptr, bp_type,
- &base_breakpoint_ops);
+ init_raw_breakpoint_without_location (w.get (), nullptr, bp_type);
w->thread = thread;
w->task = task;
enough for now, though. */
}
- init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint,
- &base_breakpoint_ops);
+ init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint);
b->enable_state = enabled ? bp_enabled : bp_disabled;
b->disposition = tempflag ? disp_del : disp_donttouch;
{
struct gdb_exception exception;
- gdb_assert (b->ops != NULL);
-
std::vector<symtab_and_line> sals;
try