Rename base_breakpoint -> code_breakpoint
Even after the previous patches reworking the inheritance of several breakpoint types, the present breakpoint hierarchy looks a bit surprising, as we have "breakpoint" as the superclass, and then "base_breakpoint" inherits from "breakpoint". Like so, simplified: breakpoint base_breakpoint ordinary_breakpoint internal_breakpoint momentary_breakpoint ada_catchpoint exception_catchpoint tracepoint watchpoint catchpoint exec_catchpoint ... The surprising part to me is having "base_breakpoint" being a subclass of "breakpoint". I'm just refering to naming here -- I mean, you'd expect that it would be the top level baseclass that would be called "base". Just flipping the names of breakpoint and base_breakpoint around wouldn't be super great for us, IMO, given we think of every type of *point as a breakpoint at the user visible level. E.g., "info breakpoints" shows watchpoints, tracepoints, etc. So it makes to call the top level class breakpoint. Instead, I propose renaming base_breakpoint to code_breakpoint. The previous patches made sure that all code breakpoints inherit from base_breakpoint, so it's fitting. Also, "code breakpoint" contrasts nicely with a watchpoint also being typically known as a "data breakpoint". After this commit, the resulting hierarchy looks like: breakpoint code_breakpoint ordinary_breakpoint internal_breakpoint momentary_breakpoint ada_catchpoint exception_catchpoint tracepoint watchpoint catchpoint exec_catchpoint ... ... which makes a lot more sense to me. I've left this patch as last in the series in case people want to bikeshed on the naming. "code" has a nice property that it's exactly as many letters as "base", so this patch didn't require any reindentation. :-) Change-Id: Id8dc06683a69fad80d88e674f65e826d6a4e3f66
This commit is contained in:
parent
46f0aab143
commit
74421c0bc8
9 changed files with 57 additions and 57 deletions
|
@ -12104,7 +12104,7 @@ static std::string ada_exception_catchpoint_cond_string
|
|||
|
||||
/* 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,
|
||||
|
@ -12113,12 +12113,12 @@ struct ada_catchpoint : public base_breakpoint
|
|||
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;
|
||||
|
@ -12247,7 +12247,7 @@ ada_catchpoint::re_set ()
|
|||
{
|
||||
/* 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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue