2017-09-27 Tom Tromey <tom@tromey.com>
+ * breakpoint.h (delete_command): Don't declare.
+ * breakpoint.c (delete_command, enable_once_command)
+ (enable_count_command, enable_delete_command, breakpoint_1)
+ (maintenance_info_breakpoints, stopin_command, stopat_command)
+ (delete_command, delete_trace_command, save_breakpoints)
+ (save_breakpoints_command, save_tracepoints_command): Constify.
+
+2017-09-27 Tom Tromey <tom@tromey.com>
+
* macrocmd.c (macro_expand_command, macro_expand_once_command)
(skip_ws, extract_identifier, macro_define_command)
(macro_undef_command, macro_list_command): Constify.
/* Prototypes for local functions. */
-static void enable_delete_command (char *, int);
-
-static void enable_once_command (char *, int);
-
-static void enable_count_command (char *, int);
-
static void disable_command (char *, int);
static void enable_command (char *, int);
static void info_watchpoints_command (char *, int);
-static int breakpoint_1 (char *, int,
- int (*) (const struct breakpoint *));
-
static int breakpoint_cond_eval (void *);
static void cleanup_executing_breakpoints (void *);
static int watchpoint_check (void *);
-static void maintenance_info_breakpoints (char *, int);
-
static int hw_breakpoint_used_count (void);
static int hw_watchpoint_use_count (struct breakpoint *);
static void stop_command (char *arg, int from_tty);
-static void stopin_command (char *arg, int from_tty);
-
-static void stopat_command (char *arg, int from_tty);
-
static void tcatch_command (char *arg, int from_tty);
static void free_bp_location (struct bp_location *loc);
static void info_tracepoints_command (char *, int);
-static void delete_trace_command (char *, int);
-
static void enable_trace_command (char *, int);
static void disable_trace_command (char *, int);
breakpoints listed. */
static int
-breakpoint_1 (char *args, int allflag,
+breakpoint_1 (const char *args, int allflag,
int (*filter) (const struct breakpoint *))
{
struct breakpoint *b;
}
static void
-maintenance_info_breakpoints (char *args, int from_tty)
+maintenance_info_breakpoints (const char *args, int from_tty)
{
breakpoint_1 (args, 1, NULL);
}
static void
-stopin_command (char *arg, int from_tty)
+stopin_command (const char *arg, int from_tty)
{
int badInput = 0;
badInput = 1;
else if (*arg != '*')
{
- char *argptr = arg;
+ const char *argptr = arg;
int hasColon = 0;
/* Look for a ':'. If this is a line number specification, then
}
static void
-stopat_command (char *arg, int from_tty)
+stopat_command (const char *arg, int from_tty)
{
int badInput = 0;
badInput = 1;
else
{
- char *argptr = arg;
+ const char *argptr = arg;
int hasColon = 0;
/* Look for a ':'. If there is a '::' then get out, otherwise
while (related != b);
}
-void
+static void
delete_command (char *arg, int from_tty)
{
struct breakpoint *b, *b_tmp;
}
static void
-enable_once_command (char *args, int from_tty)
+enable_once_command (const char *args, int from_tty)
{
map_breakpoint_numbers
(args, [&] (breakpoint *b)
}
static void
-enable_count_command (char *args, int from_tty)
+enable_count_command (const char *args, int from_tty)
{
int count;
}
static void
-enable_delete_command (char *args, int from_tty)
+enable_delete_command (const char *args, int from_tty)
{
map_breakpoint_numbers
(args, [&] (breakpoint *b)
/* Remove a tracepoint (or all if no argument). */
static void
-delete_trace_command (char *arg, int from_tty)
+delete_trace_command (const char *arg, int from_tty)
{
struct breakpoint *b, *b_tmp;
non-zero. */
static void
-save_breakpoints (char *filename, int from_tty,
+save_breakpoints (const char *filename, int from_tty,
int (*filter) (const struct breakpoint *))
{
struct breakpoint *tp;
/* The `save breakpoints' command. */
static void
-save_breakpoints_command (char *args, int from_tty)
+save_breakpoints_command (const char *args, int from_tty)
{
save_breakpoints (args, from_tty, NULL);
}
/* The `save tracepoints' command. */
static void
-save_tracepoints_command (char *args, int from_tty)
+save_tracepoints_command (const char *args, int from_tty)
{
save_breakpoints (args, from_tty, is_tracepoint);
}