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] Constify breakpoint::print_recreate
Date: Fri,  6 May 2022 18:10:36 +0000 (GMT)	[thread overview]
Message-ID: <20220506181036.C33BC385627F@sourceware.org> (raw)

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

commit 4d1ae558932c17415bbe5b0dbec0a7539a19b6d5
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Apr 30 12:36:08 2022 -0600

    Constify breakpoint::print_recreate
    
    This constifies breakpoint::print_recreate.

Diff:
---
 gdb/ada-lang.c            |  4 ++--
 gdb/break-catch-exec.c    |  4 ++--
 gdb/break-catch-fork.c    |  4 ++--
 gdb/break-catch-load.c    |  4 ++--
 gdb/break-catch-sig.c     |  4 ++--
 gdb/break-catch-syscall.c |  4 ++--
 gdb/break-catch-throw.c   |  4 ++--
 gdb/breakpoint.c          | 22 +++++++++++-----------
 gdb/breakpoint.h          |  6 +++---
 9 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index c5b9d08a91e..b11808acb71 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -12133,7 +12133,7 @@ struct ada_catchpoint : public base_breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 
   /* The name of the specific exception the user specified.  */
   std::string excep_string;
@@ -12492,7 +12492,7 @@ ada_catchpoint::print_mention () const
    exception catchpoint kinds.  */
 
 void
-ada_catchpoint::print_recreate (struct ui_file *fp)
+ada_catchpoint::print_recreate (struct ui_file *fp) const
 {
   switch (m_kind)
     {
diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c
index 5cb08bde184..00a0263ac0d 100644
--- a/gdb/break-catch-exec.c
+++ b/gdb/break-catch-exec.c
@@ -46,7 +46,7 @@ struct exec_catchpoint : public breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 
   /* Filename of a program whose exec triggered this catchpoint.
      This field is only valid immediately after this catchpoint has
@@ -141,7 +141,7 @@ exec_catchpoint::print_mention () const
 /* Implement the "print_recreate" method for exec catchpoints.  */
 
 void
-exec_catchpoint::print_recreate (struct ui_file *fp)
+exec_catchpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "catch exec");
   print_recreate_thread (fp);
diff --git a/gdb/break-catch-fork.c b/gdb/break-catch-fork.c
index 1fbea571112..e8d613f062d 100644
--- a/gdb/break-catch-fork.c
+++ b/gdb/break-catch-fork.c
@@ -44,7 +44,7 @@ struct fork_catchpoint : public breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 
   /* True if the breakpoint is for vfork, false for fork.  */
   bool is_vfork;
@@ -169,7 +169,7 @@ fork_catchpoint::print_mention () const
 /* Implement the "print_recreate" method for fork catchpoints.  */
 
 void
-fork_catchpoint::print_recreate (struct ui_file *fp)
+fork_catchpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "catch %s", is_vfork ? "vfork" : "fork");
   print_recreate_thread (fp);
diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c
index 7f2efd57de2..99aa185ad85 100644
--- a/gdb/break-catch-load.c
+++ b/gdb/break-catch-load.c
@@ -46,7 +46,7 @@ struct solib_catchpoint : public breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 
   /* True for "catch load", false for "catch unload".  */
   bool is_load;
@@ -196,7 +196,7 @@ solib_catchpoint::print_mention () const
 }
 
 void
-solib_catchpoint::print_recreate (struct ui_file *fp)
+solib_catchpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "%s %s",
 	      disposition == disp_del ? "tcatch" : "catch",
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c
index 6665c9eaab0..c42b0fd1c01 100644
--- a/gdb/break-catch-sig.c
+++ b/gdb/break-catch-sig.c
@@ -50,7 +50,7 @@ struct signal_catchpoint : public breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
   bool explains_signal (enum gdb_signal) override;
 
   /* Signal numbers used for the 'catch signal' feature.  If no signal
@@ -281,7 +281,7 @@ signal_catchpoint::print_mention () const
 /* Implement the "print_recreate" method for signal catchpoints.  */
 
 void
-signal_catchpoint::print_recreate (struct ui_file *fp)
+signal_catchpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "catch signal");
 
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index 721a87c66b6..bcdf0f117a5 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -47,7 +47,7 @@ struct syscall_catchpoint : public breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 
   /* Syscall numbers used for the 'catch syscall' feature.  If no
      syscall has been specified for filtering, it is empty.
@@ -314,7 +314,7 @@ syscall_catchpoint::print_mention () const
 /* Implement the "print_recreate" method for syscall catchpoints.  */
 
 void
-syscall_catchpoint::print_recreate (struct ui_file *fp)
+syscall_catchpoint::print_recreate (struct ui_file *fp) const
 {
   struct gdbarch *gdbarch = loc->gdbarch;
 
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 1ab518f02c0..a10334e9ae0 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -71,7 +71,7 @@ struct exception_catchpoint : public base_breakpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   bool print_one (bp_location **) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
   void print_one_detail (struct ui_out *) const override;
   void check_status (struct bpstat *bs) override;
   struct bp_location *allocate_location () override;
@@ -320,7 +320,7 @@ exception_catchpoint::print_mention () const
    catchpoints.  */
 
 void
-exception_catchpoint::print_recreate (struct ui_file *fp)
+exception_catchpoint::print_recreate (struct ui_file *fp) const
 {
   int bp_temp;
 
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ddb198523ca..ef8a7001834 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -261,7 +261,7 @@ struct ordinary_breakpoint : public base_breakpoint
   int resources_needed (const struct bp_location *) override;
   enum print_stop_action print_it (const bpstat *bs) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 };
 
 /* Internal breakpoints.  */
@@ -290,7 +290,7 @@ struct dprintf_breakpoint : public ordinary_breakpoint
 		      const address_space *aspace,
 		      CORE_ADDR bp_addr,
 		      const target_waitstatus &ws) override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
   void after_condition_true (struct bpstat *bs) override;
 };
 
@@ -306,7 +306,7 @@ struct ranged_breakpoint : public ordinary_breakpoint
   bool print_one (bp_location **) const override;
   void print_one_detail (struct ui_out *) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 };
 
 /* Static tracepoints with marker (`-m').  */
@@ -9303,7 +9303,7 @@ ranged_breakpoint::print_mention () const
 /* Implement the "print_recreate" method for ranged breakpoints.  */
 
 void
-ranged_breakpoint::print_recreate (struct ui_file *fp)
+ranged_breakpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "break-range %s, %s",
 	      event_location_to_string (location.get ()),
@@ -9691,7 +9691,7 @@ watchpoint::print_mention () const
 /* Implement the "print_recreate" method for watchpoints.  */
 
 void
-watchpoint::print_recreate (struct ui_file *fp)
+watchpoint::print_recreate (struct ui_file *fp) const
 {
   switch (type)
     {
@@ -9737,7 +9737,7 @@ struct masked_watchpoint : public watchpoint
   enum print_stop_action print_it (const bpstat *bs) const override;
   void print_one_detail (struct ui_out *) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
 };
 
 /* Implement the "insert" method for masked hardware watchpoints.  */
@@ -9879,7 +9879,7 @@ masked_watchpoint::print_mention () const
    watchpoints.  */
 
 void
-masked_watchpoint::print_recreate (struct ui_file *fp)
+masked_watchpoint::print_recreate (struct ui_file *fp) const
 {
   switch (type)
     {
@@ -11569,7 +11569,7 @@ breakpoint::print_mention () const
 }
 
 void
-breakpoint::print_recreate (struct ui_file *fp)
+breakpoint::print_recreate (struct ui_file *fp) const
 {
   internal_error_pure_virtual_called ();
 }
@@ -11748,7 +11748,7 @@ ordinary_breakpoint::print_mention () const
 }
 
 void
-ordinary_breakpoint::print_recreate (struct ui_file *fp)
+ordinary_breakpoint::print_recreate (struct ui_file *fp) const
 {
   if (type == bp_breakpoint && disposition == disp_del)
     gdb_printf (fp, "tbreak");
@@ -12004,7 +12004,7 @@ tracepoint::print_mention () const
 }
 
 void
-tracepoint::print_recreate (struct ui_file *fp)
+tracepoint::print_recreate (struct ui_file *fp) const
 {
   if (type == bp_fast_tracepoint)
     gdb_printf (fp, "ftrace");
@@ -12070,7 +12070,7 @@ dprintf_breakpoint::re_set ()
 /* Implement the "print_recreate" method for dprintf.  */
 
 void
-dprintf_breakpoint::print_recreate (struct ui_file *fp)
+dprintf_breakpoint::print_recreate (struct ui_file *fp) const
 {
   gdb_printf (fp, "dprintf %s,%s",
 	      event_location_to_string (location.get ()),
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 4f27262ef20..5db165dbf49 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -702,7 +702,7 @@ struct breakpoint
   virtual void print_mention () const;
 
   /* Print to FP the CLI command that recreates this breakpoint.  */
-  virtual void print_recreate (struct ui_file *fp);
+  virtual void print_recreate (struct ui_file *fp) const;
 
   /* Given the location (second parameter), this method decodes it and
      returns the SAL locations related to it.  For ordinary
@@ -881,7 +881,7 @@ struct watchpoint : public breakpoint
 
   enum print_stop_action print_it (const bpstat *bs) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
   bool explains_signal (enum gdb_signal) override;
 
   /* String form of exp to use for displaying to the user (malloc'd),
@@ -962,7 +962,7 @@ struct tracepoint : public breakpoint
 		      const target_waitstatus &ws) override;
   void print_one_detail (struct ui_out *uiout) const override;
   void print_mention () const override;
-  void print_recreate (struct ui_file *fp) override;
+  void print_recreate (struct ui_file *fp) const override;
   std::vector<symtab_and_line> decode_location
        (struct event_location *location,
 	struct program_space *search_pspace) override;


                 reply	other threads:[~2022-05-06 18:10 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=20220506181036.C33BC385627F@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).