diff options
author | Tom Tromey <tom@tromey.com> | 2022-05-01 16:11:26 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-05-06 12:03:35 -0600 |
commit | fed1c982dec3baba167b3fd4df3538f09fa3d339 (patch) | |
tree | 40077feab51633a68a1cf53066f83ff7f3991b90 /gdb/breakpoint.h | |
parent | b68f26dea78f1a390084a0e2bfa95f1bcf1942dc (diff) | |
download | binutils-fed1c982dec3baba167b3fd4df3538f09fa3d339.zip binutils-fed1c982dec3baba167b3fd4df3538f09fa3d339.tar.gz binutils-fed1c982dec3baba167b3fd4df3538f09fa3d339.tar.bz2 |
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.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index d244e8d..ac738fd 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -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 |