aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-04-30 12:31:15 -0600
committerTom Tromey <tom@tromey.com>2022-05-06 12:03:34 -0600
commitb713485d666a822a9e65c0272c8d7de51baa8b5f (patch)
treeffaa0436bdee2688deabb70bd3bf6c97fc6450c4 /gdb
parenta67bcaba1c47a01826ed2769a41f84c533183ddf (diff)
downloadgdb-b713485d666a822a9e65c0272c8d7de51baa8b5f.zip
gdb-b713485d666a822a9e65c0272c8d7de51baa8b5f.tar.gz
gdb-b713485d666a822a9e65c0272c8d7de51baa8b5f.tar.bz2
Constify breakpoint::print_mention
This constifies breakpoint::print_mention.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ada-lang.c4
-rw-r--r--gdb/break-catch-exec.c4
-rw-r--r--gdb/break-catch-fork.c4
-rw-r--r--gdb/break-catch-load.c4
-rw-r--r--gdb/break-catch-sig.c4
-rw-r--r--gdb/break-catch-syscall.c4
-rw-r--r--gdb/break-catch-throw.c4
-rw-r--r--gdb/breakpoint.c32
-rw-r--r--gdb/breakpoint.h6
9 files changed, 33 insertions, 33 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 68d160a..c5b9d08 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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;
diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c
index 9a89d77..5cb08bd 100644
--- a/gdb/break-catch-exec.c
+++ b/gdb/break-catch-exec.c
@@ -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);
}
diff --git a/gdb/break-catch-fork.c b/gdb/break-catch-fork.c
index 1d01b95..1fbea57 100644
--- a/gdb/break-catch-fork.c
+++ b/gdb/break-catch-fork.c
@@ -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");
diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c
index ce62aaf..7f2efd5 100644
--- a/gdb/break-catch-load.c
+++ b/gdb/break-catch-load.c
@@ -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");
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c
index 8ded603..6665c9e 100644
--- a/gdb/break-catch-sig.c
+++ b/gdb/break-catch-sig.c
@@ -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 ())
{
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index e7810cb..721a87c 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -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;
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 759391c..1ab518f 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -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;
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 195fa30..ddb1985 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 1b399d4..4f27262 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -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,