Constify breakpoint::print_mention

This constifies breakpoint::print_mention.
This commit is contained in:
Tom Tromey 2022-04-30 12:31:15 -06:00
parent a67bcaba1c
commit b713485d66
9 changed files with 33 additions and 33 deletions

View File

@ -12132,7 +12132,7 @@ struct ada_catchpoint : public base_breakpoint
void check_status (struct bpstat *bs) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
/* The name of the specific exception the user specified. */
@ -12440,7 +12440,7 @@ ada_catchpoint::print_one (bp_location **last_loc) const
for all exception catchpoint kinds. */
void
ada_catchpoint::print_mention ()
ada_catchpoint::print_mention () const
{
struct ui_out *uiout = current_uiout;

View File

@ -45,7 +45,7 @@ struct exec_catchpoint : public breakpoint
const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
/* Filename of a program whose exec triggered this catchpoint.
@ -133,7 +133,7 @@ exec_catchpoint::print_one (bp_location **last_loc) const
}
void
exec_catchpoint::print_mention ()
exec_catchpoint::print_mention () const
{
gdb_printf (_("Catchpoint %d (exec)"), number);
}

View File

@ -43,7 +43,7 @@ struct fork_catchpoint : public breakpoint
const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
/* True if the breakpoint is for vfork, false for fork. */
@ -160,7 +160,7 @@ fork_catchpoint::print_one (bp_location **last_loc) const
/* Implement the "print_mention" method for fork catchpoints. */
void
fork_catchpoint::print_mention ()
fork_catchpoint::print_mention () const
{
gdb_printf (_("Catchpoint %d (%s)"), number,
is_vfork ? "vfork" : "fork");

View File

@ -45,7 +45,7 @@ struct solib_catchpoint : public breakpoint
void check_status (struct bpstat *bs) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
/* True for "catch load", false for "catch unload". */
@ -189,7 +189,7 @@ solib_catchpoint::print_one (bp_location **locs) const
}
void
solib_catchpoint::print_mention ()
solib_catchpoint::print_mention () const
{
gdb_printf (_("Catchpoint %d (%s)"), number,
is_load ? "load" : "unload");

View File

@ -49,7 +49,7 @@ struct signal_catchpoint : public breakpoint
const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
bool explains_signal (enum gdb_signal) override;
@ -255,7 +255,7 @@ signal_catchpoint::print_one (bp_location **last_loc) const
/* Implement the "print_mention" method for signal catchpoints. */
void
signal_catchpoint::print_mention ()
signal_catchpoint::print_mention () const
{
if (!signals_to_be_caught.empty ())
{

View File

@ -46,7 +46,7 @@ struct syscall_catchpoint : public breakpoint
const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
/* Syscall numbers used for the 'catch syscall' feature. If no
@ -284,7 +284,7 @@ syscall_catchpoint::print_one (bp_location **last_loc) const
/* Implement the "print_mention" method for syscall catchpoints. */
void
syscall_catchpoint::print_mention ()
syscall_catchpoint::print_mention () const
{
struct gdbarch *gdbarch = loc->gdbarch;

View File

@ -70,7 +70,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 (bp_location **) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
void print_one_detail (struct ui_out *) const override;
void check_status (struct bpstat *bs) override;
@ -302,7 +302,7 @@ exception_catchpoint::print_one_detail (struct ui_out *uiout) const
}
void
exception_catchpoint::print_mention ()
exception_catchpoint::print_mention () const
{
struct ui_out *uiout = current_uiout;
int bp_temp;

View File

@ -110,7 +110,7 @@ static std::vector<symtab_and_line> decode_location_default
static int can_use_hardware_watchpoint
(const std::vector<value_ref_ptr> &vals);
static void mention (struct breakpoint *);
static void mention (const breakpoint *);
static struct breakpoint *set_raw_breakpoint_without_location (struct gdbarch *,
enum bptype);
@ -260,7 +260,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 () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
};
@ -270,7 +270,7 @@ struct internal_breakpoint : 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;
void print_mention () override;
void print_mention () const override;
};
/* Momentary breakpoints. */
@ -279,7 +279,7 @@ struct momentary_breakpoint : 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;
void print_mention () override;
void print_mention () const override;
};
/* DPrintf breakpoints. */
@ -305,7 +305,7 @@ struct ranged_breakpoint : public ordinary_breakpoint
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_one_detail (struct ui_out *) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
};
@ -8050,7 +8050,7 @@ set_momentary_breakpoint_at_pc (struct gdbarch *gdbarch, CORE_ADDR pc,
/* Tell the user we have just set a breakpoint B. */
static void
mention (struct breakpoint *b)
mention (const breakpoint *b)
{
b->print_mention ();
current_uiout->text ("\n");
@ -9287,7 +9287,7 @@ ranged_breakpoint::print_one_detail (struct ui_out *uiout) const
/* Implement the "print_mention" method for ranged breakpoints. */
void
ranged_breakpoint::print_mention ()
ranged_breakpoint::print_mention () const
{
struct bp_location *bl = loc;
struct ui_out *uiout = current_uiout;
@ -9654,7 +9654,7 @@ watchpoint::print_it (const bpstat *bs) const
/* Implement the "print_mention" method for hardware watchpoints. */
void
watchpoint::print_mention ()
watchpoint::print_mention () const
{
struct ui_out *uiout = current_uiout;
const char *tuple_name;
@ -9736,7 +9736,7 @@ struct masked_watchpoint : public watchpoint
bool works_in_software_mode () const override;
enum print_stop_action print_it (const bpstat *bs) const override;
void print_one_detail (struct ui_out *) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
};
@ -9845,7 +9845,7 @@ masked_watchpoint::print_one_detail (struct ui_out *uiout) const
watchpoints. */
void
masked_watchpoint::print_mention ()
masked_watchpoint::print_mention () const
{
struct ui_out *uiout = current_uiout;
const char *tuple_name;
@ -11442,7 +11442,7 @@ bpstat_remove_breakpoint_callback (struct thread_info *th, void *data)
callbacks. */
static void
say_where (struct breakpoint *b)
say_where (const breakpoint *b)
{
struct value_print_options opts;
@ -11563,7 +11563,7 @@ breakpoint::print_it (const bpstat *bs) const
}
void
breakpoint::print_mention ()
breakpoint::print_mention () const
{
internal_error_pure_virtual_called ();
}
@ -11719,7 +11719,7 @@ ordinary_breakpoint::print_it (const bpstat *bs) const
}
void
ordinary_breakpoint::print_mention ()
ordinary_breakpoint::print_mention () const
{
if (current_uiout->is_mi_like_p ())
return;
@ -11871,7 +11871,7 @@ internal_breakpoint::print_it (const bpstat *bs) const
}
void
internal_breakpoint::print_mention ()
internal_breakpoint::print_mention () const
{
/* Nothing to mention. These breakpoints are internal. */
}
@ -11900,7 +11900,7 @@ momentary_breakpoint::print_it (const bpstat *bs) const
}
void
momentary_breakpoint::print_mention ()
momentary_breakpoint::print_mention () const
{
/* Nothing to mention. These breakpoints are internal. */
}
@ -11975,7 +11975,7 @@ tracepoint::print_one_detail (struct ui_out *uiout) const
}
void
tracepoint::print_mention ()
tracepoint::print_mention () const
{
if (current_uiout->is_mi_like_p ())
return;

View File

@ -699,7 +699,7 @@ struct breakpoint
/* Display information about this breakpoint after setting it
(roughly speaking; this is called from "mention"). */
virtual void print_mention ();
virtual void print_mention () const;
/* Print to FP the CLI command that recreates this breakpoint. */
virtual void print_recreate (struct ui_file *fp);
@ -880,7 +880,7 @@ struct watchpoint : public breakpoint
virtual bool works_in_software_mode () const;
enum print_stop_action print_it (const bpstat *bs) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
bool explains_signal (enum gdb_signal) override;
@ -961,7 +961,7 @@ struct tracepoint : public breakpoint
const address_space *aspace, CORE_ADDR bp_addr,
const target_waitstatus &ws) override;
void print_one_detail (struct ui_out *uiout) const override;
void print_mention () override;
void print_mention () const override;
void print_recreate (struct ui_file *fp) override;
std::vector<symtab_and_line> decode_location
(struct event_location *location,