From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 9D5B93857823; Fri, 29 Apr 2022 22:24:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D5B93857823 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove breakpoint_ops from init_catchpoint X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: a48ddc0d6ab6ce60ecc7d20d704d3891b383dbf6 X-Git-Newrev: b3316ff1532571a111dcc27f4545640aafbdaffd Message-Id: <20220429222421.9D5B93857823@sourceware.org> Date: Fri, 29 Apr 2022 22:24:21 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 22:24:21 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db3316ff15325= 71a111dcc27f4545640aafbdaffd commit b3316ff1532571a111dcc27f4545640aafbdaffd Author: Tom Tromey Date: Sun Jan 16 19:05:28 2022 -0700 Remove breakpoint_ops from init_catchpoint =20 init_catchpoint is only ever passed a single breakpoint_ops pointer, so remove the parameter. Diff: --- gdb/break-catch-exec.c | 3 +-- gdb/break-catch-fork.c | 3 +-- gdb/break-catch-load.c | 2 +- gdb/break-catch-sig.c | 2 +- gdb/break-catch-syscall.c | 3 +-- gdb/break-catch-throw.c | 3 +-- gdb/breakpoint.c | 6 +++--- gdb/breakpoint.h | 6 ++---- 8 files changed, 11 insertions(+), 17 deletions(-) diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c index 9d84fed273b..ac4ea18ee65 100644 --- a/gdb/break-catch-exec.c +++ b/gdb/break-catch-exec.c @@ -204,8 +204,7 @@ catch_exec_command_1 (const char *arg, int from_tty, error (_("Junk at end of arguments.")); =20 std::unique_ptr 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 (); =20 install_breakpoint (0, std::move (c), 1); diff --git a/gdb/break-catch-fork.c b/gdb/break-catch-fork.c index 5af5aac9d98..eb88e78ed3a 100644 --- a/gdb/break-catch-fork.c +++ b/gdb/break-catch-fork.c @@ -182,8 +182,7 @@ create_fork_vfork_event_catchpoint (struct gdbarch *gdb= arch, { std::unique_ptr c (new fork_catchpoint ()); =20 - init_catchpoint (c.get (), gdbarch, temp, cond_string, - &vtable_breakpoint_ops); + init_catchpoint (c.get (), gdbarch, temp, cond_string); c->is_vfork =3D is_vfork; c->forked_inferior_pid =3D null_ptid; =20 diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c index 0a27b05a280..699fbc19365 100644 --- a/gdb/break-catch-load.c +++ b/gdb/break-catch-load.c @@ -227,7 +227,7 @@ add_solib_catchpoint (const char *arg, bool is_load, bo= ol is_temp, bool enabled) } =20 c->is_load =3D is_load; - init_catchpoint (c.get (), gdbarch, is_temp, NULL, &vtable_breakpoint_op= s); + init_catchpoint (c.get (), gdbarch, is_temp, NULL); =20 c->enable_state =3D enabled ? bp_enabled : bp_disabled; =20 diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index 8de11c96db8..8f6d3967718 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -317,7 +317,7 @@ create_signal_catchpoint (int tempflag, std::vector &&filter, struct gdbarch *gdbarch =3D get_current_arch (); =20 std::unique_ptr c (new signal_catchpoint ()); - init_catchpoint (c.get (), gdbarch, tempflag, NULL, &vtable_breakpoint_o= ps); + init_catchpoint (c.get (), gdbarch, tempflag, nullptr); c->signals_to_be_caught =3D std::move (filter); c->catch_all =3D catch_all; =20 diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index 2566a20f3fb..3b160bf9a04 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -348,8 +348,7 @@ create_syscall_event_catchpoint (int tempflag, std::vec= tor &&filter) struct gdbarch *gdbarch =3D get_current_arch (); =20 std::unique_ptr 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 =3D std::move (filter); =20 install_breakpoint (0, std::move (c), 1); diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index f9bcc8d0b74..4b79e0ffcba 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -365,8 +365,7 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&e= xcept_rx, =20 std::unique_ptr cp (new exception_catchpoint ()); =20 - 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 =3D ex_event; cp->exception_rx =3D std::move (except_rx); cp->pattern =3D std::move (pattern); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index b29b021662d..c1459161707 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7833,13 +7833,13 @@ disable_breakpoints_in_freed_objfile (struct objfil= e *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 =3D current_program_space; =20 - init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint, ops); + init_raw_breakpoint (b, gdbarch, sal, bp_catchpoint, + &vtable_breakpoint_ops); =20 if (cond_string =3D=3D nullptr) b->cond_string.reset (); diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 10e7410220d..8b92dc47878 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1524,13 +1524,11 @@ extern void =20 /* 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. */ =20 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); =20 /* Add breakpoint B on the breakpoint list, and notify the user, the target and breakpoint_created observers of its existence. If