Kill init_sal
[deliverable/binutils-gdb.git] / gdb / break-catch-syscall.c
index 58fc279440e3f3e0bd64a615f4cb9bdbe7bf9a8c..1be29bea6298a93c6628cdd3d1c09df2e3d06bab 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);
-  c->syscalls_to_be_caught = filter;
+  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.  */
This page took 0.042544 seconds and 4 git commands to generate.