forked from Imagelibrary/binutils-gdb
Introduce catchpoint class
This introduces a catchpoint class that is used as the base class for all catchpoints. init_catchpoint is rewritten to be a constructor instead. This changes the hierarchy a little -- some catchpoints now inherit from base_breakpoint whereas previously they did not. This isn't a problem, as long as re_set is redefined in catchpoint.
This commit is contained in:
@@ -1012,6 +1012,20 @@ struct tracepoint : public breakpoint
|
||||
int static_trace_marker_id_idx = 0;
|
||||
};
|
||||
|
||||
/* The base class for catchpoints. */
|
||||
|
||||
struct catchpoint : public base_breakpoint
|
||||
{
|
||||
/* If TEMP is true, then make the breakpoint temporary. If
|
||||
COND_STRING is not NULL, then store it in the breakpoint. */
|
||||
catchpoint (struct gdbarch *gdbarch, bool temp, const char *cond_string);
|
||||
|
||||
void re_set () override
|
||||
{
|
||||
/* For catchpoints, the default is to do nothing. */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* The following stuff is an abstract data type "bpstat" ("breakpoint
|
||||
status"). This provides the ability to determine whether we have
|
||||
@@ -1440,14 +1454,6 @@ extern void
|
||||
int enabled,
|
||||
int from_tty);
|
||||
|
||||
/* Initialize a new breakpoint of the bp_catchpoint kind. If TEMP
|
||||
is true, then make the breakpoint temporary. If COND_STRING is
|
||||
not NULL, then store it in the breakpoint. */
|
||||
|
||||
extern void init_catchpoint (struct breakpoint *b,
|
||||
struct gdbarch *gdbarch, bool temp,
|
||||
const char *cond_string);
|
||||
|
||||
/* Add breakpoint B on the breakpoint list, and notify the user, the
|
||||
target and breakpoint_created observers of its existence. If
|
||||
INTERNAL is non-zero, the breakpoint number will be allocated from
|
||||
|
||||
Reference in New Issue
Block a user