From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id A0FBB3954444; Fri, 6 May 2022 18:10:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0FBB3954444 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] Constify breakpoint::print_one X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 7bd8631327cc222ebe0906d76e5faea4e4b291ba X-Git-Newrev: a67bcaba1c47a01826ed2769a41f84c533183ddf Message-Id: <20220506181026.A0FBB3954444@sourceware.org> Date: Fri, 6 May 2022 18:10:26 +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, 06 May 2022 18:10:26 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da67bcaba1c47= a01826ed2769a41f84c533183ddf commit a67bcaba1c47a01826ed2769a41f84c533183ddf Author: Tom Tromey Date: Sat Apr 30 12:25:36 2022 -0600 Constify breakpoint::print_one =20 This constifies breakpoint::print_one. 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 | 10 +++++----- gdb/breakpoint.h | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 7d03e33bdaa..68d160a0190 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -12131,7 +12131,7 @@ struct ada_catchpoint : public base_breakpoint void re_set () override; void check_status (struct bpstat *bs) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; =20 @@ -12383,7 +12383,7 @@ ada_catchpoint::print_it (const bpstat *bs) const catchpoint kinds. */ =20 bool -ada_catchpoint::print_one (struct bp_location **last_loc) +ada_catchpoint::print_one (bp_location **last_loc) const {=20 struct ui_out *uiout =3D current_uiout; struct value_print_options opts; diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c index 89fa3935b62..9a89d7717ea 100644 --- a/gdb/break-catch-exec.c +++ b/gdb/break-catch-exec.c @@ -44,7 +44,7 @@ struct exec_catchpoint : public breakpoint CORE_ADDR bp_addr, const target_waitstatus &ws) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; =20 @@ -105,7 +105,7 @@ exec_catchpoint::print_it (const bpstat *bs) const } =20 bool -exec_catchpoint::print_one (struct bp_location **last_loc) +exec_catchpoint::print_one (bp_location **last_loc) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/break-catch-fork.c b/gdb/break-catch-fork.c index bf4437e0f27..1d01b95f018 100644 --- a/gdb/break-catch-fork.c +++ b/gdb/break-catch-fork.c @@ -42,7 +42,7 @@ struct fork_catchpoint : public breakpoint CORE_ADDR bp_addr, const target_waitstatus &ws) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; =20 @@ -129,7 +129,7 @@ fork_catchpoint::print_it (const bpstat *bs) const /* Implement the "print_one" method for fork catchpoints. */ =20 bool -fork_catchpoint::print_one (struct bp_location **last_loc) +fork_catchpoint::print_one (bp_location **last_loc) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c index d0ef182a49e..ce62aaf53d6 100644 --- a/gdb/break-catch-load.c +++ b/gdb/break-catch-load.c @@ -44,7 +44,7 @@ struct solib_catchpoint : public breakpoint const target_waitstatus &ws) override; void check_status (struct bpstat *bs) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; =20 @@ -147,7 +147,7 @@ solib_catchpoint::print_it (const bpstat *bs) const } =20 bool -solib_catchpoint::print_one (struct bp_location **locs) +solib_catchpoint::print_one (bp_location **locs) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index 77ecb466250..8ded60374c9 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -48,7 +48,7 @@ struct signal_catchpoint : public breakpoint CORE_ADDR bp_addr, const target_waitstatus &ws) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; bool explains_signal (enum gdb_signal) override; @@ -204,7 +204,7 @@ signal_catchpoint::print_it (const bpstat *bs) const /* Implement the "print_one" method for signal catchpoints. */ =20 bool -signal_catchpoint::print_one (struct bp_location **last_loc) +signal_catchpoint::print_one (bp_location **last_loc) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index 5b7cd1a9eb7..e7810cb711c 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -45,7 +45,7 @@ struct syscall_catchpoint : public breakpoint CORE_ADDR bp_addr, const target_waitstatus &ws) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; =20 @@ -231,7 +231,7 @@ syscall_catchpoint::print_it (const bpstat *bs) const /* Implement the "print_one" method for syscall catchpoints. */ =20 bool -syscall_catchpoint::print_one (struct bp_location **last_loc) +syscall_catchpoint::print_one (bp_location **last_loc) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index 6b3601a6fd0..759391c7ad3 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -69,7 +69,7 @@ struct exception_catchpoint : public base_breakpoint { void re_set () override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; void print_one_detail (struct ui_out *) const override; @@ -253,7 +253,7 @@ exception_catchpoint::print_it (const bpstat *bs) const } =20 bool -exception_catchpoint::print_one (struct bp_location **last_loc) +exception_catchpoint::print_one (bp_location **last_loc) const { struct value_print_options opts; struct ui_out *uiout =3D current_uiout; diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e6158e6589b..195fa302a6d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -303,7 +303,7 @@ struct ranged_breakpoint : public ordinary_breakpoint const target_waitstatus &ws) override; int resources_needed (const struct bp_location *) override; enum print_stop_action print_it (const bpstat *bs) const override; - bool print_one (struct bp_location **) override; + bool print_one (bp_location **) const override; void print_one_detail (struct ui_out *) const override; void print_mention () override; void print_recreate (struct ui_file *fp) override; @@ -5922,7 +5922,7 @@ wrap_indent_at_field (struct ui_out *uiout, const cha= r *col_name) */ =20 static const char * -bp_condition_evaluator (struct breakpoint *b) +bp_condition_evaluator (const breakpoint *b) { char host_evals =3D 0; char target_evals =3D 0; @@ -5975,7 +5975,7 @@ bp_location_condition_evaluator (struct bp_location *= bl) /* Print the LOC location out of the list of B->LOC locations. */ =20 static void -print_breakpoint_location (struct breakpoint *b, +print_breakpoint_location (const breakpoint *b, struct bp_location *loc) { struct ui_out *uiout =3D current_uiout; @@ -9240,7 +9240,7 @@ ranged_breakpoint::print_it (const bpstat *bs) const /* Implement the "print_one" method for ranged breakpoints. */ =20 bool -ranged_breakpoint::print_one (struct bp_location **last_loc) +ranged_breakpoint::print_one (bp_location **last_loc) const { struct bp_location *bl =3D loc; struct value_print_options opts; @@ -11514,7 +11514,7 @@ say_where (struct breakpoint *b) =20 /* See breakpoint.h. */ =20 -bp_location_range breakpoint::locations () +bp_location_range breakpoint::locations () const { return bp_location_range (this->loc); } diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 194452a3ee3..1b399d47384 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -675,7 +675,7 @@ struct breakpoint /* Display information about this breakpoint, for "info breakpoints". Returns false if this method should use the default behavior. */ - virtual bool print_one (struct bp_location **) + virtual bool print_one (bp_location **) const { return false; } @@ -729,7 +729,7 @@ struct breakpoint } =20 /* Return a range of this breakpoint's locations. */ - bp_location_range locations (); + bp_location_range locations () const; =20 breakpoint *next =3D NULL; /* Type of breakpoint. */