/* An instance of this type is used to represent an Ada catchpoint. */
-struct ada_catchpoint : public base_breakpoint
+struct ada_catchpoint : public code_breakpoint
{
ada_catchpoint (struct gdbarch *gdbarch_,
enum ada_exception_catchpoint_kind kind,
bool tempflag,
bool enabled,
bool from_tty)
- : base_breakpoint (gdbarch_, bp_catchpoint),
+ : code_breakpoint (gdbarch_, bp_catchpoint),
m_kind (kind)
{
add_location (sal);
- /* Unlike most base_breakpoint types, Ada catchpoints are
+ /* Unlike most code_breakpoint types, Ada catchpoints are
pspace-specific. */
gdb_assert (sal.pspace != nullptr);
this->pspace = sal.pspace;
{
/* Call the base class's method. This updates the catchpoint's
locations. */
- this->base_breakpoint::re_set ();
+ this->code_breakpoint::re_set ();
/* Reparse the exception conditional expressions. One for each
location. */
/* The type of an exception catchpoint. Unlike most catchpoints, this
one is implemented with code breakpoints, so it inherits struct
- base_breakpoint, not struct catchpoint. */
+ code_breakpoint, not struct catchpoint. */
-struct exception_catchpoint : public base_breakpoint
+struct exception_catchpoint : public code_breakpoint
{
exception_catchpoint (struct gdbarch *gdbarch,
bool temp, const char *cond_string_,
enum exception_event_kind kind_,
std::string &&except_rx)
- : base_breakpoint (gdbarch, bp_catchpoint, temp, cond_string_),
+ : code_breakpoint (gdbarch, bp_catchpoint, temp, cond_string_),
kind (kind_),
exception_rx (std::move (except_rx)),
pattern (exception_rx.empty ()
static void map_breakpoint_numbers (const char *,
gdb::function_view<void (breakpoint *)>);
-static void breakpoint_re_set_default (base_breakpoint *);
+static void breakpoint_re_set_default (code_breakpoint *);
static void
create_sals_from_location_default (struct event_location *location,
(struct event_location *location,
struct linespec_result *canonical);
-const struct breakpoint_ops base_breakpoint_ops =
+const struct breakpoint_ops code_breakpoint_ops =
{
create_sals_from_location_default,
create_breakpoints_sal,
{
}
-base_breakpoint::~base_breakpoint ()
+code_breakpoint::~code_breakpoint ()
{
}
}
/* The structure to be used in regular breakpoints. */
-struct ordinary_breakpoint : public base_breakpoint
+struct ordinary_breakpoint : public code_breakpoint
{
- using base_breakpoint::base_breakpoint;
+ using code_breakpoint::code_breakpoint;
int resources_needed (const struct bp_location *) override;
enum print_stop_action print_it (const bpstat *bs) const override;
the program, and they end up installed on the breakpoint chain with
a negative breakpoint number. They're visible in "maint info
breakpoints", but not "info breakpoints". */
-struct internal_breakpoint : public base_breakpoint
+struct internal_breakpoint : public code_breakpoint
{
internal_breakpoint (struct gdbarch *gdbarch,
enum bptype type, CORE_ADDR address)
- : base_breakpoint (gdbarch, type)
+ : code_breakpoint (gdbarch, type)
{
symtab_and_line sal;
sal.pc = address;
on the breakpoint chain and they all same the same number (zero).
They're visible in "maint info breakpoints", but not "info
breakpoints". */
-struct momentary_breakpoint : public base_breakpoint
+struct momentary_breakpoint : public code_breakpoint
{
momentary_breakpoint (struct gdbarch *gdbarch_, enum bptype bptype,
program_space *pspace_,
const struct frame_id &frame_id_,
int thread_)
- : base_breakpoint (gdbarch_, bptype)
+ : code_breakpoint (gdbarch_, bptype)
{
/* If FRAME_ID is valid, it should be a real frame, not an inlined
or tail-called one. */
TYPE. */
template<typename... Arg>
-static std::unique_ptr<base_breakpoint>
+static std::unique_ptr<code_breakpoint>
new_breakpoint_from_type (struct gdbarch *gdbarch, bptype type,
Arg&&... args)
{
- base_breakpoint *b;
+ code_breakpoint *b;
switch (type)
{
gdb_assert_not_reached ("invalid type");
}
- return std::unique_ptr<base_breakpoint> (b);
+ return std::unique_ptr<code_breakpoint> (b);
}
/* A helper function that validates that COMMANDS are valid for a
handle_jit_event (bs->bp_location_at->address);
break;
case bp_gnu_ifunc_resolver:
- gnu_ifunc_resolver_stop ((base_breakpoint *) b);
+ gnu_ifunc_resolver_stop ((code_breakpoint *) b);
break;
case bp_gnu_ifunc_resolver_return:
- gnu_ifunc_resolver_return_stop ((base_breakpoint *) b);
+ gnu_ifunc_resolver_return_stop ((code_breakpoint *) b);
break;
}
}
}
bp_location *
-base_breakpoint::add_location (const symtab_and_line &sal)
+code_breakpoint::add_location (const symtab_and_line &sal)
{
struct bp_location *new_loc, **tmp;
CORE_ADDR adjusted_address;
update_dprintf_command_list (b);
}
-base_breakpoint::base_breakpoint (struct gdbarch *gdbarch_,
+code_breakpoint::code_breakpoint (struct gdbarch *gdbarch_,
enum bptype type_,
gdb::array_view<const symtab_and_line> sals,
event_location_up &&location_,
int enabled, int internal, unsigned flags,
int display_canonical)
{
- std::unique_ptr<base_breakpoint> b
+ std::unique_ptr<code_breakpoint> b
= new_breakpoint_from_type (gdbarch,
type,
sals,
if (location_type == PROBE_LOCATION)
return &tracepoint_probe_breakpoint_ops;
else
- return &base_breakpoint_ops;
+ return &code_breakpoint_ops;
}
else
{
if (location_type == PROBE_LOCATION)
return &bkpt_probe_breakpoint_ops;
else
- return &base_breakpoint_ops;
+ return &code_breakpoint_ops;
}
}
if (location != nullptr)
return breakpoint_ops_for_event_location_type
(event_location_type (location), is_tracepoint);
- return &base_breakpoint_ops;
+ return &code_breakpoint_ops;
}
/* See breakpoint.h. */
0, bp_dprintf,
0 /* Ignore count */,
pending_break_support,
- &base_breakpoint_ops,
+ &code_breakpoint_ops,
from_tty,
1 /* enabled */,
0 /* internal */,
/* Default breakpoint_ops methods. */
void
-base_breakpoint::re_set ()
+code_breakpoint::re_set ()
{
/* FIXME: is this still reachable? */
if (breakpoint_event_location_empty_p (this))
}
int
-base_breakpoint::insert_location (struct bp_location *bl)
+code_breakpoint::insert_location (struct bp_location *bl)
{
CORE_ADDR addr = bl->target_info.reqstd_address;
}
int
-base_breakpoint::remove_location (struct bp_location *bl,
+code_breakpoint::remove_location (struct bp_location *bl,
enum remove_bp_reason reason)
{
if (bl->probe.prob != nullptr)
}
int
-base_breakpoint::breakpoint_hit (const struct bp_location *bl,
+code_breakpoint::breakpoint_hit (const struct bp_location *bl,
const address_space *aspace,
CORE_ADDR bp_addr,
const target_waitstatus &ws)
}
std::vector<symtab_and_line>
-base_breakpoint::decode_location (struct event_location *location,
+code_breakpoint::decode_location (struct event_location *location,
struct program_space *search_pspace)
{
if (event_location_type (location) == PROBE_LOCATION)
untouched. */
void
-update_breakpoint_locations (base_breakpoint *b,
+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)
locations. */
static void
-breakpoint_re_set_default (base_breakpoint *b)
+breakpoint_re_set_default (code_breakpoint *b)
{
struct program_space *filter_pspace = current_program_space;
std::vector<symtab_and_line> expanded, expanded_end;
bp_fast_tracepoint /* type_wanted */,
0 /* Ignore count */,
pending_break_support,
- &base_breakpoint_ops,
+ &code_breakpoint_ops,
from_tty,
1 /* enabled */,
0 /* internal */, 0);
}
else
{
- ops = &base_breakpoint_ops;
+ ops = &code_breakpoint_ops;
location = string_to_event_location (&arg, current_language);
type = bp_static_tracepoint;
}
utp->type /* type_wanted */,
0 /* Ignore count */,
pending_break_support,
- &base_breakpoint_ops,
+ &code_breakpoint_ops,
0 /* from_tty */,
utp->enabled /* enabled */,
0 /* internal */,
/* Abstract base class representing code breakpoints. User "break"
breakpoints, internal and momentary breakpoints, etc. IOW, any
kind of breakpoint whose locations are created from SALs. */
-struct base_breakpoint : public breakpoint
+struct code_breakpoint : public breakpoint
{
using breakpoint::breakpoint;
description of the location, and COND_STRING as condition
expression. If LOCATION is NULL then create an "address
location" from the address in the SAL. */
- base_breakpoint (struct gdbarch *gdbarch, bptype type,
+ code_breakpoint (struct gdbarch *gdbarch, bptype type,
gdb::array_view<const symtab_and_line> sals,
event_location_up &&location,
gdb::unique_xmalloc_ptr<char> filter,
int enabled, unsigned flags,
int display_canonical);
- ~base_breakpoint () override = 0;
+ ~code_breakpoint () override = 0;
/* Add a location for SAL to this breakpoint. */
bp_location *add_location (const symtab_and_line &sal);
/* An instance of this type is used to represent all kinds of
tracepoints. */
-struct tracepoint : public base_breakpoint
+struct tracepoint : public code_breakpoint
{
- using base_breakpoint::base_breakpoint;
+ using code_breakpoint::code_breakpoint;
int breakpoint_hit (const struct bp_location *bl,
const address_space *aspace, CORE_ADDR bp_addr,
/* Initialize a struct bp_location. */
extern void update_breakpoint_locations
- (base_breakpoint *b,
+ (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);
extern void rwatch_command_wrapper (const char *, int, bool);
extern void tbreak_command (const char *, int);
-extern const struct breakpoint_ops base_breakpoint_ops;
+extern const struct breakpoint_ops code_breakpoint_ops;
/* Arguments to pass as context to some catch command handlers. */
#define CATCH_PERMANENT ((void *) (uintptr_t) 0)
/* Returns the breakpoint ops appropriate for use with with LOCATION and
according to IS_TRACEPOINT. Use this to ensure, for example, that you pass
the correct ops to create_breakpoint for probe locations. If LOCATION is
- NULL, returns base_breakpoint_ops. */
+ NULL, returns code_breakpoint_ops. */
extern const struct breakpoint_ops *breakpoint_ops_for_event_location
(const struct event_location *location, bool is_tracepoint);
/* Handle inferior hit of bp_gnu_ifunc_resolver, see its definition. */
static void
-elf_gnu_ifunc_resolver_stop (base_breakpoint *b)
+elf_gnu_ifunc_resolver_stop (code_breakpoint *b)
{
struct breakpoint *b_return;
struct frame_info *prev_frame = get_prev_frame (get_current_frame ());
/* Handle inferior hit of bp_gnu_ifunc_resolver_return, see its definition. */
static void
-elf_gnu_ifunc_resolver_return_stop (base_breakpoint *b)
+elf_gnu_ifunc_resolver_return_stop (code_breakpoint *b)
{
thread_info *thread = inferior_thread ();
struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
"gnu-indirect-function breakpoint type %d"),
(int) b->type);
}
- b = (base_breakpoint *) b_next;
+ b = (code_breakpoint *) b_next;
}
gdb_assert (b->type == bp_gnu_ifunc_resolver);
gdb_assert (b->loc->next == NULL);
else if (dprintf)
{
type_wanted = bp_dprintf;
- ops = &base_breakpoint_ops;
+ ops = &code_breakpoint_ops;
}
else
{
type_wanted = hardware ? bp_hardware_breakpoint : bp_breakpoint;
- ops = &base_breakpoint_ops;
+ ops = &code_breakpoint_ops;
}
if (is_explicit)
/* See elf_gnu_ifunc_resolver_stop for its real implementation. */
static void
-stub_gnu_ifunc_resolver_stop (base_breakpoint *b)
+stub_gnu_ifunc_resolver_stop (code_breakpoint *b)
{
internal_error (__FILE__, __LINE__,
_("elf_gnu_ifunc_resolver_stop cannot be reached."));
/* See elf_gnu_ifunc_resolver_return_stop for its real implementation. */
static void
-stub_gnu_ifunc_resolver_return_stop (base_breakpoint *b)
+stub_gnu_ifunc_resolver_return_stop (code_breakpoint *b)
{
internal_error (__FILE__, __LINE__,
_("elf_gnu_ifunc_resolver_return_stop cannot be reached."));
bp_breakpoint,
0,
AUTO_BOOLEAN_TRUE,
- &base_breakpoint_ops,
+ &code_breakpoint_ops,
0, 1, internal_bp, 0);
}
catch (const gdb_exception &except)
struct cmd_list_element;
class probe;
struct lookup_name_info;
-struct base_breakpoint;
+struct code_breakpoint;
/* How to match a lookup name against a symbol search name. */
enum class symbol_name_match_type
CORE_ADDR *function_address_p);
/* See elf_gnu_ifunc_resolver_stop for its real implementation. */
- void (*gnu_ifunc_resolver_stop) (base_breakpoint *b);
+ void (*gnu_ifunc_resolver_stop) (code_breakpoint *b);
/* See elf_gnu_ifunc_resolver_return_stop for its real implementation. */
- void (*gnu_ifunc_resolver_return_stop) (base_breakpoint *b);
+ void (*gnu_ifunc_resolver_return_stop) (code_breakpoint *b);
};
#define gnu_ifunc_resolve_addr gnu_ifunc_fns_p->gnu_ifunc_resolve_addr