From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id D2A3B3857405; Fri, 29 Apr 2022 22:23:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2A3B3857405 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] Change inheritance of dprintf X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 1fd30a473032c6fa23db9db46f4853951c5de0d6 X-Git-Newrev: 5ad71d67aef6b2885fcaf52b9151af6e28e9648a Message-Id: <20220429222325.D2A3B3857405@sourceware.org> Date: Fri, 29 Apr 2022 22:23:25 +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:23:25 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5ad71d67aef6= b2885fcaf52b9151af6e28e9648a commit 5ad71d67aef6b2885fcaf52b9151af6e28e9648a Author: Tom Tromey Date: Sat Jan 15 15:35:35 2022 -0700 Change inheritance of dprintf =20 The dprintf breakpoint ops is mostly a copy of bpkt_breakpoint_ops, except it's written out explicitly -- and, importantly, there's nothing that bpkt_breakpoint_ops overrides that dprintf does not. This changes dprintf to simply inherit directly, and updates struct dprintf_breakpoint to reflect the change as well. Diff: --- gdb/breakpoint.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 1258f3d503e..275860fee15 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -271,7 +271,7 @@ struct momentary_breakpoint : public base_breakpoint }; =20 /* DPrintf breakpoints. */ -struct dprintf_breakpoint : public base_breakpoint +struct dprintf_breakpoint : public ordinary_breakpoint { }; =20 @@ -14603,11 +14603,8 @@ initialize_breakpoint_ops (void) ops->decode_location =3D strace_marker_decode_location; =20 ops =3D &dprintf_breakpoint_ops; - *ops =3D bkpt_base_breakpoint_ops; + *ops =3D bkpt_breakpoint_ops; ops->re_set =3D dprintf_re_set; - ops->resources_needed =3D bkpt_resources_needed; - ops->print_it =3D bkpt_print_it; - ops->print_mention =3D bkpt_print_mention; ops->print_recreate =3D dprintf_print_recreate; ops->after_condition_true =3D dprintf_after_condition_true; ops->breakpoint_hit =3D dprintf_breakpoint_hit;