Constify breakpoint::print_one

This constifies breakpoint::print_one.
This commit is contained in:
Tom Tromey 2022-04-30 12:25:36 -06:00
parent 7bd8631327
commit a67bcaba1c
9 changed files with 21 additions and 21 deletions

View file

@ -12131,7 +12131,7 @@ struct ada_catchpoint : public base_breakpoint
void re_set () override; void re_set () override;
void check_status (struct bpstat *bs) override; void check_status (struct bpstat *bs) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -12383,7 +12383,7 @@ ada_catchpoint::print_it (const bpstat *bs) const
catchpoint kinds. */ catchpoint kinds. */
bool bool
ada_catchpoint::print_one (struct bp_location **last_loc) ada_catchpoint::print_one (bp_location **last_loc) const
{ {
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;
struct value_print_options opts; struct value_print_options opts;

View file

@ -44,7 +44,7 @@ struct exec_catchpoint : public breakpoint
CORE_ADDR bp_addr, CORE_ADDR bp_addr,
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -105,7 +105,7 @@ exec_catchpoint::print_it (const bpstat *bs) const
} }
bool 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 value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -42,7 +42,7 @@ struct fork_catchpoint : public breakpoint
CORE_ADDR bp_addr, CORE_ADDR bp_addr,
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -129,7 +129,7 @@ fork_catchpoint::print_it (const bpstat *bs) const
/* Implement the "print_one" method for fork catchpoints. */ /* Implement the "print_one" method for fork catchpoints. */
bool 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 value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -44,7 +44,7 @@ struct solib_catchpoint : public breakpoint
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
void check_status (struct bpstat *bs) override; void check_status (struct bpstat *bs) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -147,7 +147,7 @@ solib_catchpoint::print_it (const bpstat *bs) const
} }
bool bool
solib_catchpoint::print_one (struct bp_location **locs) solib_catchpoint::print_one (bp_location **locs) const
{ {
struct value_print_options opts; struct value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -48,7 +48,7 @@ struct signal_catchpoint : public breakpoint
CORE_ADDR bp_addr, CORE_ADDR bp_addr,
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
bool explains_signal (enum gdb_signal) 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. */ /* Implement the "print_one" method for signal catchpoints. */
bool 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 value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -45,7 +45,7 @@ struct syscall_catchpoint : public breakpoint
CORE_ADDR bp_addr, CORE_ADDR bp_addr,
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -231,7 +231,7 @@ syscall_catchpoint::print_it (const bpstat *bs) const
/* Implement the "print_one" method for syscall catchpoints. */ /* Implement the "print_one" method for syscall catchpoints. */
bool 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 value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -69,7 +69,7 @@ struct exception_catchpoint : public base_breakpoint
{ {
void re_set () override; void re_set () override;
enum print_stop_action print_it (const bpstat *bs) const 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_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
void print_one_detail (struct ui_out *) const override; void print_one_detail (struct ui_out *) const override;
@ -253,7 +253,7 @@ exception_catchpoint::print_it (const bpstat *bs) const
} }
bool 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 value_print_options opts;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -303,7 +303,7 @@ struct ranged_breakpoint : public ordinary_breakpoint
const target_waitstatus &ws) override; const target_waitstatus &ws) override;
int resources_needed (const struct bp_location *) override; int resources_needed (const struct bp_location *) override;
enum print_stop_action print_it (const bpstat *bs) const 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_one_detail (struct ui_out *) const override;
void print_mention () override; void print_mention () override;
void print_recreate (struct ui_file *fp) override; void print_recreate (struct ui_file *fp) override;
@ -5922,7 +5922,7 @@ wrap_indent_at_field (struct ui_out *uiout, const char *col_name)
*/ */
static const char * static const char *
bp_condition_evaluator (struct breakpoint *b) bp_condition_evaluator (const breakpoint *b)
{ {
char host_evals = 0; char host_evals = 0;
char target_evals = 0; char target_evals = 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. */ /* Print the LOC location out of the list of B->LOC locations. */
static void static void
print_breakpoint_location (struct breakpoint *b, print_breakpoint_location (const breakpoint *b,
struct bp_location *loc) struct bp_location *loc)
{ {
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;
@ -9240,7 +9240,7 @@ ranged_breakpoint::print_it (const bpstat *bs) const
/* Implement the "print_one" method for ranged breakpoints. */ /* Implement the "print_one" method for ranged breakpoints. */
bool bool
ranged_breakpoint::print_one (struct bp_location **last_loc) ranged_breakpoint::print_one (bp_location **last_loc) const
{ {
struct bp_location *bl = loc; struct bp_location *bl = loc;
struct value_print_options opts; struct value_print_options opts;
@ -11514,7 +11514,7 @@ say_where (struct breakpoint *b)
/* See breakpoint.h. */ /* See breakpoint.h. */
bp_location_range breakpoint::locations () bp_location_range breakpoint::locations () const
{ {
return bp_location_range (this->loc); return bp_location_range (this->loc);
} }

View file

@ -675,7 +675,7 @@ struct breakpoint
/* Display information about this breakpoint, for "info /* Display information about this breakpoint, for "info
breakpoints". Returns false if this method should use the breakpoints". Returns false if this method should use the
default behavior. */ default behavior. */
virtual bool print_one (struct bp_location **) virtual bool print_one (bp_location **) const
{ {
return false; return false;
} }
@ -729,7 +729,7 @@ struct breakpoint
} }
/* Return a range of this breakpoint's locations. */ /* Return a range of this breakpoint's locations. */
bp_location_range locations (); bp_location_range locations () const;
breakpoint *next = NULL; breakpoint *next = NULL;
/* Type of breakpoint. */ /* Type of breakpoint. */