aboutsummaryrefslogtreecommitdiff
path: root/gdb/break-catch-throw.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-05-01 16:11:26 -0600
committerTom Tromey <tom@tromey.com>2022-05-06 12:03:35 -0600
commitfed1c982dec3baba167b3fd4df3538f09fa3d339 (patch)
tree40077feab51633a68a1cf53066f83ff7f3991b90 /gdb/break-catch-throw.c
parentb68f26dea78f1a390084a0e2bfa95f1bcf1942dc (diff)
downloadfsf-binutils-gdb-fed1c982dec3baba167b3fd4df3538f09fa3d339.zip
fsf-binutils-gdb-fed1c982dec3baba167b3fd4df3538f09fa3d339.tar.gz
fsf-binutils-gdb-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/break-catch-throw.c')
-rw-r--r--gdb/break-catch-throw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 0237af7..f15fa53 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -65,12 +65,13 @@ static const struct exception_names exception_functions[] =
/* The type of an exception catchpoint. */
-struct exception_catchpoint : public base_breakpoint
+struct exception_catchpoint : public catchpoint
{
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),
+ : catchpoint (gdbarch, temp, cond_string),
kind (kind_),
exception_rx (std::move (except_rx)),
pattern (exception_rx.empty ()
@@ -371,9 +372,8 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&except_rx,
struct gdbarch *gdbarch = get_current_arch ();
std::unique_ptr<exception_catchpoint> cp
- (new exception_catchpoint (gdbarch, ex_event, std::move (except_rx)));
-
- init_catchpoint (cp.get (), gdbarch, tempflag, cond_string);
+ (new exception_catchpoint (gdbarch, tempflag, cond_string,
+ ex_event, std::move (except_rx)));
cp->re_set ();