aboutsummaryrefslogtreecommitdiff
path: root/gdb/break-catch-throw.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-05-01 11:20:34 -0600
committerTom Tromey <tom@tromey.com>2022-05-06 12:03:35 -0600
commit73063f5180a07b9c8042887cd4cada0b89388556 (patch)
treeaace65fbb3dc1d24861a00395416aadd32efa884 /gdb/break-catch-throw.c
parent3101e4a1c5a9f14dd6860e439bbefdce00adc9f6 (diff)
downloadgdb-73063f5180a07b9c8042887cd4cada0b89388556.zip
gdb-73063f5180a07b9c8042887cd4cada0b89388556.tar.gz
gdb-73063f5180a07b9c8042887cd4cada0b89388556.tar.bz2
Remove init_raw_breakpoint_without_location
This removes init_raw_breakpoint_without_location, replacing it with a constructor on 'breakpoint' itself. The subclasses and callers are all updated.
Diffstat (limited to 'gdb/break-catch-throw.c')
-rw-r--r--gdb/break-catch-throw.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 59e73da..0237af7 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -67,9 +67,11 @@ static const struct exception_names exception_functions[] =
struct exception_catchpoint : public base_breakpoint
{
- exception_catchpoint (enum exception_event_kind kind_,
+ exception_catchpoint (struct gdbarch *gdbarch,
+ enum exception_event_kind kind_,
std::string &&except_rx)
- : kind (kind_),
+ : base_breakpoint (gdbarch, bp_catchpoint),
+ kind (kind_),
exception_rx (std::move (except_rx)),
pattern (exception_rx.empty ()
? nullptr
@@ -366,10 +368,12 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&except_rx,
const char *cond_string,
enum exception_event_kind ex_event, int from_tty)
{
+ struct gdbarch *gdbarch = get_current_arch ();
+
std::unique_ptr<exception_catchpoint> cp
- (new exception_catchpoint (ex_event, std::move (except_rx)));
+ (new exception_catchpoint (gdbarch, ex_event, std::move (except_rx)));
- init_catchpoint (cp.get (), get_current_arch (), tempflag, cond_string);
+ init_catchpoint (cp.get (), gdbarch, tempflag, cond_string);
cp->re_set ();