aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 4c7542a..9abc144 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7804,23 +7804,18 @@ disable_breakpoints_in_freed_objfile (struct objfile *objfile)
/* See breakpoint.h. */
-void
-init_catchpoint (struct breakpoint *b,
- struct gdbarch *gdbarch, bool temp,
- const char *cond_string)
+catchpoint::catchpoint (struct gdbarch *gdbarch, bool temp,
+ const char *cond_string_)
+ : base_breakpoint (gdbarch, bp_catchpoint)
{
symtab_and_line sal;
sal.pspace = current_program_space;
- /* This should already have been set in the constructor. */
- gdb_assert (b->type == bp_catchpoint);
- init_raw_breakpoint (b, sal, bp_catchpoint);
+ init_raw_breakpoint (this, sal, bp_catchpoint);
- if (cond_string == nullptr)
- b->cond_string.reset ();
- else
- b->cond_string = make_unique_xstrdup (cond_string);
- b->disposition = temp ? disp_del : disp_donttouch;
+ if (cond_string_ != nullptr)
+ cond_string = make_unique_xstrdup (cond_string_);
+ disposition = temp ? disp_del : disp_donttouch;
}
void