static void map_breakpoint_numbers (const char *,
gdb::function_view<void (breakpoint *)>);
-static void ignore_command (char *, int);
-
static void breakpoint_re_set_default (struct breakpoint *);
static void
(struct breakpoint *b, const struct event_location *location,
struct program_space *search_pspace);
-static void clear_command (char *, int);
-
static int can_use_hardware_watchpoint (struct value *);
static void mention (struct breakpoint *);
const address_space *,
CORE_ADDR, int);
-static void info_breakpoints_command (char *, int);
-
static void info_watchpoints_command (char *, int);
-static void commands_command (char *, int);
-
-static void condition_command (char *, int);
-
static int remove_breakpoint (struct bp_location *);
static int remove_breakpoint_1 (struct bp_location *, enum remove_bp_reason);
enum bptype type,
int *other_type_used);
-static void hbreak_command (char *, int);
-
-static void thbreak_command (char *, int);
-
static void enable_breakpoint_disp (struct breakpoint *, enum bpdisp,
int count);
static void disable_trace_command (char *, int);
-static void trace_pass_command (char *, int);
+static void trace_pass_command (const char *, int);
static void set_tracepoint_count (int num);
/* condition N EXP -- set break condition of breakpoint N to EXP. */
static void
-condition_command (char *arg, int from_tty)
+condition_command (const char *arg, int from_tty)
{
struct breakpoint *b;
- char *p;
+ const char *p;
int bnum;
if (arg == 0)
}
static void
-commands_command (char *arg, int from_tty)
+commands_command (const char *arg, int from_tty)
{
commands_command_1 (arg, from_tty, NULL);
}
}
static void
-info_breakpoints_command (char *args, int from_tty)
+info_breakpoints_command (const char *args, int from_tty)
{
breakpoint_1 (args, 0, NULL);
default_collect_info ();
}
+/* Temporary non-const overload. */
+
+static void
+info_breakpoints_command (char *args, int from_tty)
+{
+ info_breakpoints_command ((const char *) args, from_tty);
+}
+
static void
info_watchpoints_command (char *args, int from_tty)
{
}
void
-break_command (char *arg, int from_tty)
+break_command (const char *arg, int from_tty)
{
break_command_1 (arg, 0, from_tty);
}
void
-tbreak_command (char *arg, int from_tty)
+tbreak_command (const char *arg, int from_tty)
{
break_command_1 (arg, BP_TEMPFLAG, from_tty);
}
static void
-hbreak_command (char *arg, int from_tty)
+hbreak_command (const char *arg, int from_tty)
{
break_command_1 (arg, BP_HARDWAREFLAG, from_tty);
}
static void
-thbreak_command (char *arg, int from_tty)
+thbreak_command (const char *arg, int from_tty)
{
break_command_1 (arg, (BP_TEMPFLAG | BP_HARDWAREFLAG), from_tty);
}
line. */
static void
-dprintf_command (char *arg_in, int from_tty)
+dprintf_command (const char *arg, int from_tty)
{
- const char *arg = arg_in;
event_location_up location = string_to_event_location (&arg, current_language);
/* If non-NULL, ARG should have been advanced past the location;
}
static void
-agent_printf_command (char *arg, int from_tty)
+agent_printf_command (const char *arg, int from_tty)
{
error (_("May only run agent-printf on the target"));
}
/* Implement the "break-range" CLI command. */
static void
-break_range_command (char *arg_in, int from_tty)
+break_range_command (const char *arg, int from_tty)
{
- const char *arg = arg_in;
const char *arg_start;
struct linespec_result canonical_start, canonical_end;
int bp_count, can_use_bp, length;
calls watch_command_1. */
static void
-watch_maybe_just_location (char *arg, int accessflag, int from_tty)
+watch_maybe_just_location (const char *arg, int accessflag, int from_tty)
{
int just_location = 0;
}
static void
-watch_command (char *arg, int from_tty)
+watch_command (const char *arg, int from_tty)
{
watch_maybe_just_location (arg, hw_write, from_tty);
}
}
static void
-rwatch_command (char *arg, int from_tty)
+rwatch_command (const char *arg, int from_tty)
{
watch_maybe_just_location (arg, hw_read, from_tty);
}
}
static void
-awatch_command (char *arg, int from_tty)
+awatch_command (const char *arg, int from_tty)
{
watch_maybe_just_location (arg, hw_access, from_tty);
}
/* Delete breakpoints by address or line. */
static void
-clear_command (char *arg, int from_tty)
+clear_command (const char *arg, int from_tty)
{
struct breakpoint *b;
int default_match;
/* Command to set ignore-count of breakpoint N to COUNT. */
static void
-ignore_command (char *args, int from_tty)
+ignore_command (const char *args, int from_tty)
{
- char *p = args;
+ const char *p = args;
int num;
if (p == 0)
}
static void
-trace_command (char *arg_in, int from_tty)
+trace_command (const char *arg, int from_tty)
{
- const char *arg = arg_in;
struct breakpoint_ops *ops;
event_location_up location = string_to_event_location (&arg,
}
static void
-ftrace_command (char *arg_in, int from_tty)
+ftrace_command (const char *arg, int from_tty)
{
- const char *arg = arg_in;
event_location_up location = string_to_event_location (&arg,
current_language);
create_breakpoint (get_current_arch (),
/* strace command implementation. Creates a static tracepoint. */
static void
-strace_command (char *arg_in, int from_tty)
+strace_command (const char *arg, int from_tty)
{
- const char *arg = arg_in;
struct breakpoint_ops *ops;
event_location_up location;
Also accepts special argument "all". */
static void
-trace_pass_command (char *args, int from_tty)
+trace_pass_command (const char *args, int from_tty)
{
struct tracepoint *t1;
- unsigned int count;
+ ULONGEST count;
if (args == 0 || *args == 0)
error (_("passcount command requires an "
"argument (count + optional TP num)"));
- count = strtoul (args, &args, 10); /* Count comes first, then TP num. */
+ count = strtoulst (args, &args, 10); /* Count comes first, then TP num. */
args = skip_spaces (args);
if (*args && strncasecmp (args, "all", 3) == 0)
(tracepoint_count) is returned. */
struct tracepoint *
-get_tracepoint_by_number (char **arg,
+get_tracepoint_by_number (const char **arg,
number_or_range_parser *parser)
{
struct breakpoint *t;
int tpnum;
- char *instring = arg == NULL ? NULL : *arg;
+ const char *instring = arg == NULL ? NULL : *arg;
if (parser != NULL)
{