probe: Replace VEC(probe_ops_cp) with std::vector
[deliverable/binutils-gdb.git] / gdb / break-catch-syscall.c
index 701645e9bc209aa596dce208bca6805bc0568828..01e761ce37e19ad0225564ffebb04fb5cca76b55 100644 (file)
@@ -370,14 +370,13 @@ static void
 create_syscall_event_catchpoint (int tempflag, std::vector<int> &&filter,
                                  const struct breakpoint_ops *ops)
 {
-  struct syscall_catchpoint *c;
   struct gdbarch *gdbarch = get_current_arch ();
 
-  c = new syscall_catchpoint ();
-  init_catchpoint (c, gdbarch, tempflag, NULL, ops);
+  std::unique_ptr<syscall_catchpoint> c (new syscall_catchpoint ());
+  init_catchpoint (c.get (), gdbarch, tempflag, NULL, ops);
   c->syscalls_to_be_caught = std::move (filter);
 
-  install_breakpoint (0, c, 1);
+  install_breakpoint (0, std::move (c), 1);
 }
 
 /* Splits the argument using space as delimiter.  */
@@ -636,8 +635,6 @@ initialize_syscall_catchpoint_ops (void)
   ops->print_recreate = print_recreate_catch_syscall;
 }
 
-initialize_file_ftype _initialize_break_catch_syscall;
-
 void
 _initialize_break_catch_syscall (void)
 {
This page took 0.024394 seconds and 4 git commands to generate.