Remove breakpoint_ops from init_catchpoint
authorTom Tromey <tom@tromey.com>
Mon, 17 Jan 2022 02:05:28 +0000 (19:05 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 29 Apr 2022 22:14:32 +0000 (16:14 -0600)
init_catchpoint is only ever passed a single breakpoint_ops pointer,
so remove the parameter.

gdb/break-catch-exec.c
gdb/break-catch-fork.c
gdb/break-catch-load.c
gdb/break-catch-sig.c
gdb/break-catch-syscall.c
gdb/break-catch-throw.c
gdb/breakpoint.c
gdb/breakpoint.h

index 9d84fed273baf92e32b795fcc75df75080792087..ac4ea18ee65fe43fed581ed991f837a1369be0c9 100644 (file)
@@ -204,8 +204,7 @@ catch_exec_command_1 (const char *arg, int from_tty,
     error (_("Junk at end of arguments."));
 
   std::unique_ptr<exec_catchpoint> c (new exec_catchpoint ());
-  init_catchpoint (c.get (), gdbarch, temp, cond_string,
-                  &vtable_breakpoint_ops);
+  init_catchpoint (c.get (), gdbarch, temp, cond_string);
   c->exec_pathname.reset ();
 
   install_breakpoint (0, std::move (c), 1);
index 5af5aac9d98825fce9afafea9a9c80baad3b9cbd..eb88e78ed3ac8e1c9f528cf81e9f385d0a3cc8e5 100644 (file)
@@ -182,8 +182,7 @@ create_fork_vfork_event_catchpoint (struct gdbarch *gdbarch,
 {
   std::unique_ptr<fork_catchpoint> c (new fork_catchpoint ());
 
-  init_catchpoint (c.get (), gdbarch, temp, cond_string,
-                  &vtable_breakpoint_ops);
+  init_catchpoint (c.get (), gdbarch, temp, cond_string);
   c->is_vfork = is_vfork;
   c->forked_inferior_pid = null_ptid;
 
index 0a27b05a280b2af0f24801029b4c7a17cc9a257b..699fbc19365c3d4fd4b9a621ef03a7fcdb9ab26d 100644 (file)
@@ -227,7 +227,7 @@ add_solib_catchpoint (const char *arg, bool is_load, bool is_temp, bool enabled)
     }
 
   c->is_load = is_load;
-  init_catchpoint (c.get (), gdbarch, is_temp, NULL, &vtable_breakpoint_ops);
+  init_catchpoint (c.get (), gdbarch, is_temp, NULL);
 
   c->enable_state = enabled ? bp_enabled : bp_disabled;
 
index 8de11c96db8c44b55381d02599e5b6e273115b84..8f6d39677183b14149e5ba3fa96aa189519e41bf 100644 (file)
@@ -317,7 +317,7 @@ create_signal_catchpoint (int tempflag, std::vector<gdb_signal> &&filter,
   struct gdbarch *gdbarch = get_current_arch ();
 
   std::unique_ptr<signal_catchpoint> c (new signal_catchpoint ());
-  init_catchpoint (c.get (), gdbarch, tempflag, NULL, &vtable_breakpoint_ops);
+  init_catchpoint (c.get (), gdbarch, tempflag, nullptr);
   c->signals_to_be_caught = std::move (filter);
   c->catch_all = catch_all;
 
index 2566a20f3fb99451d8ea1da7fcd40afd41bb309d..3b160bf9a040512f8985865ad7eba6d74a976a64 100644 (file)
@@ -348,8 +348,7 @@ create_syscall_event_catchpoint (int tempflag, std::vector<int> &&filter)
   struct gdbarch *gdbarch = get_current_arch ();
 
   std::unique_ptr<syscall_catchpoint> c (new syscall_catchpoint ());
-  init_catchpoint (c.get (), gdbarch, tempflag, nullptr,
-                  &vtable_breakpoint_ops);
+  init_catchpoint (c.get (), gdbarch, tempflag, nullptr);
   c->syscalls_to_be_caught = std::move (filter);
 
   install_breakpoint (0, std::move (c), 1);
index f9bcc8d0b74b897643ba13c61221e85dadb895dc..4b79e0ffcbacfe8321d871c894cbb208d2bd6714 100644 (file)
@@ -365,8 +365,7 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&except_rx,
 
   std::unique_ptr<exception_catchpoint> cp (new exception_catchpoint ());
 
-  init_catchpoint (cp.get (), get_current_arch (), tempflag, cond_string,
-                  &vtable_breakpoint_ops);
+  init_catchpoint (cp.get (), get_current_arch (), tempflag, cond_string);
   cp->kind = ex_event;
   cp->exception_rx = std::move (except_rx);
   cp->pattern = std::move (pattern);
index b29b021662d72ea0080f1ae9ecd9a089b19d14c9..c145916170721ea96ffd5244101e5a17b4092c41 100644 (file)
@@ -7833,13 +7833,13 @@ disable_breakpoints_in_freed_objfile (struct objfile *objfile)
 void
 init_catchpoint (struct breakpoint *b,
                 struct gdbarch *gdbarch, bool temp,
-                const char *cond_string,
-                const struct breakpoint_ops *ops)
+                const char *cond_string)
 {
   symtab_and_line sal;
   sal.pspace = current_program_space;
 
-  init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint, ops);
+  init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint,
+                      &vtable_breakpoint_ops);
 
   if (cond_string == nullptr)
     b->cond_string.reset ();
index 10e7410220d19abdcbcaed6276cc1477cbac7243..8b92dc4787877e62aea7796288e84a7af1398afa 100644 (file)
@@ -1524,13 +1524,11 @@ extern void
 
 /* Initialize a new breakpoint of the bp_catchpoint kind.  If TEMP
    is true, then make the breakpoint temporary.  If COND_STRING is
-   not NULL, then store it in the breakpoint.  OPS, if not NULL, is
-   the breakpoint_ops structure associated to the catchpoint.  */
+   not NULL, then store it in the breakpoint.  */
 
 extern void init_catchpoint (struct breakpoint *b,
                             struct gdbarch *gdbarch, bool temp,
-                            const char *cond_string,
-                            const struct breakpoint_ops *ops);
+                            const char *cond_string);
 
 /* Add breakpoint B on the breakpoint list, and notify the user, the
    target and breakpoint_created observers of its existence.  If