public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Change inheritance of dprintf
Date: Fri, 29 Apr 2022 22:23:25 +0000 (GMT)	[thread overview]
Message-ID: <20220429222325.D2A3B3857405@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ad71d67aef6b2885fcaf52b9151af6e28e9648a

commit 5ad71d67aef6b2885fcaf52b9151af6e28e9648a
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jan 15 15:35:35 2022 -0700

    Change inheritance of dprintf
    
    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
 };
 
 /* DPrintf breakpoints.  */
-struct dprintf_breakpoint : public base_breakpoint
+struct dprintf_breakpoint : public ordinary_breakpoint
 {
 };
 
@@ -14603,11 +14603,8 @@ initialize_breakpoint_ops (void)
   ops->decode_location = strace_marker_decode_location;
 
   ops = &dprintf_breakpoint_ops;
-  *ops = bkpt_base_breakpoint_ops;
+  *ops = bkpt_breakpoint_ops;
   ops->re_set = dprintf_re_set;
-  ops->resources_needed = bkpt_resources_needed;
-  ops->print_it = bkpt_print_it;
-  ops->print_mention = bkpt_print_mention;
   ops->print_recreate = dprintf_print_recreate;
   ops->after_condition_true = dprintf_after_condition_true;
   ops->breakpoint_hit = dprintf_breakpoint_hit;


                 reply	other threads:[~2022-04-29 22:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220429222325.D2A3B3857405@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).