+2017-11-07 Tom Tromey <tom@tromey.com>
+
+ * solib.h (no_shared_libraries): Constify.
+ * frame.h (return_command): Constify.
+ * cli/cli-cmds.h (quit_command): Constify.
+ * top.h (quit_command, execute_command): Constify.
+ * target.h (flash_erase_command): Constify.
+ * inferior.h (set_inferior_args, attach_command): Constify.
+ * tracepoint.h (start_tracing, stop_tracing): Constify.
+ * breakpoint.h (break_command, tbreak_command)
+ (hbreak_command_wrapper, thbreak_command_wrapper)
+ (rbreak_command_wrapper, watch_command_wrapper)
+ (awatch_command_wrapper, rwatch_command_wrapper)
+ (get_tracepoint_by_number): Constify.
+ * symtab.c (info_variables_command, rbreak_command)
+ (symtab_symbol_info): Constify.
+ (info_variables_command): Add non-const overload.
+ * top.c (dont_repeat_command): Constify.
+ * breakpoint.c (ignore_command, commands_command)
+ (condition_command, tbreak_command, hbreak_command)
+ (thbreak_command, clear_command, break_command)
+ (info_breakpoints_command, watch_command, rwatch_command)
+ (awatch_command, trace_command, ftrace_command, strace_command)
+ (trace_pass_command, break_range_command, dprintf_command)
+ (agent_printf_command, get_tracepoint_by_number)
+ (watch_maybe_just_location, trace_pass_command): Constify.
+ (info_breakpoints_command): Add non-const overload.
+ * tracefile.c (tsave_command): Constify.
+ * infcmd.c (attach_command, disconnect_command, signal_command)
+ (queue_signal_command, stepi_command, nexti_command)
+ (finish_command, next_command, step_command, until_command)
+ (advance_command, jump_command, continue_command, run_command)
+ (start_command, starti_command, interrupt_command)
+ (run_command_1, set_inferior_args, step_1): Constify.
+ * inferior.c (add_inferior_command, remove_inferior_command)
+ (clone_inferior_command): Constify.
+ * linux-fork.c (checkpoint_command, restart_command): Constify.
+ * windows-nat.c (signal_event_command): Constify.
+ * guile/guile.c (guile_repl_command, guile_command): Constify.
+ * printcmd.c (x_command, display_command, printf_command)
+ (output_command, set_command, call_command, print_command)
+ (eval_command): Constify.
+ (non_const_set_command): Remove.
+ (_initialize_printcmd): Update.
+ * source.c (forward_search_command, reverse_search_command):
+ Constify.
+ * jit.c (jit_reader_load_command, jit_reader_unload_command):
+ Constify.
+ * infrun.c (handle_command): Constify.
+ * memattr.c (mem_command): Constify.
+ * stack.c (return_command, up_command, up_silently_command)
+ (down_command, down_silently_command, frame_command)
+ (backtrace_command, func_command, backtrace_command_1): Constify.
+ (backtrace_command): Add non-const overload.
+ * remote-sim.c (simulator_command): Constify.
+ * exec.c (set_section_command): Constify.
+ * tracepoint.c (tdump_command, trace_variable_command)
+ (tstatus_command, tstop_command, tstart_command)
+ (end_actions_pseudocommand, while_stepping_pseudocommand)
+ (collect_pseudocommand, teval_pseudocommand, actions_command)
+ (start_tracing, stop_tracing): Constify.
+ * value.c (init_if_undefined_command): Constify.
+ * tui/tui-stack.c (tui_update_command): Constify.
+ * tui/tui-win.c (tui_refresh_all_command)
+ (tui_set_tab_width_command, tui_set_win_height_command)
+ (tui_set_focus_command, tui_scroll_forward_command)
+ (tui_scroll_backward_command, tui_scroll_left_command)
+ (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
+ (tui_set_win_height): Constify.
+ * tui/tui-layout.c (tui_layout_command): Constify.
+ * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
+ (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
+ (proc_untrace_sysexit_cmd): Constify.
+ * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
+ (threadset_test_cmd, threadlist_update_test_cmd)
+ (threadalive_test): Constify.
+ * objc-lang.c (print_object_command): Constify.
+ * command.h (add_com): Constify.
+ * cli/cli-dump.c (restore_command): Constify.
+ * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
+ (help_command, complete_command, shell_command, edit_command)
+ (list_command, disassemble_command, make_command)
+ (apropos_command, alias_command): Constify.
+ * cli/cli-script.c (document_command, define_command)
+ (while_command, if_command, validate_comname): Constify.
+ * cli/cli-decode.c (struct cmd_list_element): Change type of
+ "fun".
+ * target.c (do_monitor_command, flash_erase_command): Constify.
+ * regcache.c (reg_flush_command): Constify.
+ * reverse.c (reverse_step, reverse_next, reverse_stepi)
+ (reverse_nexti, reverse_continue, reverse_finish)
+ (save_bookmark_command, goto_bookmark_command)
+ (exec_reverse_once): Constify.
+ * python/python.c (python_interactive_command, python_command):
+ Constify.
+ * typeprint.c (ptype_command, whatis_command, whatis_exp):
+ Constify.
+ * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
+ * gcore.c (gcore_command): Constify.
+
2017-11-07 Tom Tromey <tom@tromey.com>
* printcmd.c (x_command): Call set_repeat_arguments.
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)
{
NOT be deallocated after use. */
const char *bpdisp_text (enum bpdisp disp);
-extern void break_command (char *, int);
+extern void break_command (const char *, int);
-extern void hbreak_command_wrapper (char *, int);
-extern void thbreak_command_wrapper (char *, int);
-extern void rbreak_command_wrapper (char *, int);
+extern void hbreak_command_wrapper (const char *, int);
+extern void thbreak_command_wrapper (const char *, int);
+extern void rbreak_command_wrapper (const char *, int);
extern void watch_command_wrapper (const char *, int, int);
extern void awatch_command_wrapper (const char *, int, int);
extern void rwatch_command_wrapper (const char *, int, int);
-extern void tbreak_command (char *, int);
+extern void tbreak_command (const char *, int);
extern struct breakpoint_ops base_breakpoint_ops;
extern struct breakpoint_ops bkpt_breakpoint_ops;
/* Find a tracepoint by parsing a number in the supplied string. */
extern struct tracepoint *
- get_tracepoint_by_number (char **arg,
+ get_tracepoint_by_number (const char **arg,
number_or_range_parser *parser);
/* Return a vector of all tracepoints currently defined. The vector
#include <algorithm>
#include <string>
-/* Prototypes for local command functions */
-
-static void complete_command (char *, int);
-
-static void echo_command (char *, int);
-
-static void pwd_command (char *, int);
-
-static void help_command (char *, int);
-
-static void make_command (char *, int);
-
-static void shell_escape (const char *, int);
-
-static void edit_command (char *, int);
-
-static void list_command (char *, int);
-
/* Prototypes for local utility functions */
static void print_sal_location (const symtab_and_line &sal);
is ignored. */
static void
-help_command (char *command, int from_tty)
+help_command (const char *command, int from_tty)
{
help_cmd (command, gdb_stdout);
}
[Is that why this function writes output with *_unfiltered?] */
static void
-complete_command (char *arg_entry, int from_tty)
+complete_command (const char *arg, int from_tty)
{
- const char *arg = arg_entry;
-
dont_repeat ();
if (max_completions == 0)
/* Handle the quit command. */
void
-quit_command (char *args, int from_tty)
+quit_command (const char *args, int from_tty)
{
int exit_code = 0;
}
static void
-pwd_command (char *args, int from_tty)
+pwd_command (const char *args, int from_tty)
{
if (args)
error (_("The \"pwd\" command does not take an argument: %s"), args);
static void
-echo_command (char *text, int from_tty)
+echo_command (const char *text, int from_tty)
{
const char *p = text;
int c;
/* Implementation of the "shell" command. */
static void
-shell_command (char *arg, int from_tty)
+shell_command (const char *arg, int from_tty)
{
shell_escape (arg, from_tty);
}
static void
-edit_command (char *arg, int from_tty)
+edit_command (const char *arg, int from_tty)
{
struct symtab_and_line sal;
struct symbol *sym;
}
static void
-list_command (char *arg, int from_tty)
+list_command (const char *arg, int from_tty)
{
struct symbol *sym;
const char *arg1;
int dummy_end = 0;
int dummy_beg = 0;
int linenum_beg = 0;
- char *p;
+ const char *p;
/* Pull in the current default source line if necessary. */
if (arg == NULL || ((arg[0] == '+' || arg[0] == '-') && arg[1] == '\0'))
2) File names and contents for all relevant source files are displayed. */
static void
-disassemble_command (char *arg, int from_tty)
+disassemble_command (const char *arg, int from_tty)
{
struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR low, high;
}
static void
-make_command (char *arg, int from_tty)
+make_command (const char *arg, int from_tty)
{
if (arg == 0)
shell_escape ("make", from_tty);
regular expression. */
static void
-apropos_command (char *searchstr, int from_tty)
+apropos_command (const char *searchstr, int from_tty)
{
if (searchstr == NULL)
error (_("REGEXP string is empty"));
/* Make an alias of an existing command. */
static void
-alias_command (char *args, int from_tty)
+alias_command (const char *args, int from_tty)
{
int i, alias_argc, command_argc;
int abbrev_flag = 0;
- char *equals;
+ const char *equals;
const char *alias, *command;
if (args == NULL || strchr (args, '=') == NULL)
/* Exported to gdb/top.c and gdb/main.c */
-extern void quit_command (char *, int);
+extern void quit_command (const char *, int);
extern void source_script (const char *, int);
/* Add an element to the list of commands. */
struct cmd_list_element *
-add_com (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
+add_com (const char *name, enum command_class theclass,
+ cmd_const_cfunc_ftype *fun,
const char *doc)
{
return add_cmd (name, theclass, fun, doc, &cmdlist);
}
static void
-restore_command (char *args_in, int from_tty)
+restore_command (const char *args, int from_tty)
{
struct callback_data data;
bfd *ibfd;
int binary_flag = 0;
- const char *args = args_in;
if (!target_has_execution)
noprocess ();
loop condition is nonzero. */
static void
-while_command (char *arg, int from_tty)
+while_command (const char *arg, int from_tty)
{
control_level = 1;
command_line_up command = get_command_line (while_control, arg);
on the value of the if conditional. */
static void
-if_command (char *arg, int from_tty)
+if_command (const char *arg, int from_tty)
{
control_level = 1;
command_line_up command = get_command_line (if_control, arg);
prefix. */
static struct cmd_list_element **
-validate_comname (char **comname)
+validate_comname (const char **comname)
{
struct cmd_list_element **list = &cmdlist;
- char *p, *last_word;
+ const char *p, *last_word;
if (*comname == 0)
error_no_arg (_("name of command to define"));
if (last_word != *comname)
{
struct cmd_list_element *c;
- char saved_char;
- const char *tem = *comname;
/* Separate the prefix and the command. */
- saved_char = last_word[-1];
- last_word[-1] = '\0';
+ std::string prefix (*comname, last_word - 1);
+ const char *tem = prefix.c_str ();
c = lookup_cmd (&tem, cmdlist, "", 0, 1);
if (c->prefixlist == NULL)
- error (_("\"%s\" is not a prefix command."), *comname);
+ error (_("\"%s\" is not a prefix command."), prefix.c_str ());
list = c->prefixlist;
- last_word[-1] = saved_char;
*comname = last_word;
}
}
static void
-define_command (char *comname, int from_tty)
+define_command (const char *comname, int from_tty)
{
#define MAX_TMPBUF 128
enum cmd_hook_type
CMD_POST_HOOK
};
struct cmd_list_element *c, *newc, *hookc = 0, **list;
- char *tem, *comfull;
- const char *tem_c;
+ const char *tem, *comfull;
char tmpbuf[MAX_TMPBUF];
int hook_type = CMD_NO_HOOK;
int hook_name_size = 0;
list = validate_comname (&comname);
/* Look it up, and verify that we got an exact match. */
- tem_c = comname;
- c = lookup_cmd (&tem_c, *list, "", -1, 1);
+ tem = comname;
+ c = lookup_cmd (&tem, *list, "", -1, 1);
if (c && strcmp (comname, c->name) != 0)
c = 0;
if (hook_type != CMD_NO_HOOK)
{
/* Look up cmd it hooks, and verify that we got an exact match. */
- tem_c = comname + hook_name_size;
- hookc = lookup_cmd (&tem_c, *list, "", -1, 0);
+ tem = comname + hook_name_size;
+ hookc = lookup_cmd (&tem, *list, "", -1, 0);
if (hookc && strcmp (comname + hook_name_size, hookc->name) != 0)
hookc = 0;
if (!hookc)
}
static void
-document_command (char *comname, int from_tty)
+document_command (const char *comname, int from_tty)
{
struct cmd_list_element *c, **list;
const char *tem;
- char *comfull;
+ const char *comfull;
char tmpbuf[128];
comfull = comname;
struct cmd_list_element **cmd);
extern struct cmd_list_element *add_com (const char *, enum command_class,
- cmd_cfunc_ftype *fun,
+ cmd_const_cfunc_ftype *fun,
const char *);
extern struct cmd_list_element *add_com_alias (const char *, const char *,
/* Prototypes for local functions */
-static void set_section_command (char *, int);
-
static void exec_files_info (struct target_ops *);
static void init_exec_ops (void);
}
static void
-set_section_command (char *args, int from_tty)
+set_section_command (const char *args, int from_tty)
{
struct target_section *p;
- char *secname;
+ const char *secname;
unsigned seclen;
unsigned long secaddr;
char secprint[100];
extern void info_locals_command (char *, int);
-extern void return_command (char *, int);
+extern void return_command (const char *, int);
/* Set FRAME's unwinder temporarily, so that we can call a sniffer.
If sniffing fails, the caller should be sure to call
Generate a core file from the inferior process. */
static void
-gcore_command (char *args, int from_tty)
+gcore_command (const char *args, int from_tty)
{
gdb::unique_xmalloc_ptr<char> corefilename;
/* Implementation of the gdb "guile-repl" command. */
static void
-guile_repl_command (char *arg, int from_tty)
+guile_repl_command (const char *arg, int from_tty)
{
scoped_restore restore_async = make_scoped_restore (¤t_ui->async, 0);
TODO: Add the result to Guile's history? */
static void
-guile_command (char *arg, int from_tty)
+guile_command (const char *arg, int from_tty)
{
scoped_restore restore_async = make_scoped_restore (¤t_ui->async, 0);
commands. */
static void
-guile_repl_command (char *arg, int from_tty)
+guile_repl_command (const char *arg, int from_tty)
{
arg = skip_spaces (arg);
if (arg && *arg)
}
static void
-guile_command (char *arg, int from_tty)
+guile_command (const char *arg, int from_tty)
{
arg = skip_spaces (arg);
if (arg && *arg)
static void until_next_command (int);
-static void until_command (char *, int);
-
-static void path_command (char *, int);
-
static void info_float_command (char *, int);
-static void disconnect_command (char *, int);
-
static void info_program_command (char *, int);
-static void finish_command (char *, int);
-
-static void signal_command (char *, int);
-
-static void jump_command (char *, int);
-
-static void step_1 (int, int, char *);
-
-static void next_command (char *, int);
-
-static void step_command (char *, int);
-
-static void run_command (char *, int);
+static void step_1 (int, int, const char *);
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error (_("The program is not being run."));
NEWARGS is not transferred. */
void
-set_inferior_args (char *newargs)
+set_inferior_args (const char *newargs)
{
xfree (current_inferior ()->args);
current_inferior ()->args = newargs ? xstrdup (newargs) : NULL;
requested by RUN_HOW. */
static void
-run_command_1 (char *args, int from_tty, enum run_how run_how)
+run_command_1 (const char *args, int from_tty, enum run_how run_how)
{
const char *exec_file;
struct cleanup *old_chain;
}
static void
-run_command (char *args, int from_tty)
+run_command (const char *args, int from_tty)
{
run_command_1 (args, from_tty, RUN_NORMAL);
}
program. */
static void
-start_command (char *args, int from_tty)
+start_command (const char *args, int from_tty)
{
/* Some languages such as Ada need to search inside the program
minimal symbols for the location where to put the temporary
instruction. */
static void
-starti_command (char *args, int from_tty)
+starti_command (const char *args, int from_tty)
{
run_command_1 (args, from_tty, RUN_STOP_AT_FIRST_INSN);
}
/* continue [-a] [proceed-count] [&] */
static void
-continue_command (char *args, int from_tty)
+continue_command (const char *args, int from_tty)
{
int async_exec;
int all_threads = 0;
/* Step until outside of current statement. */
static void
-step_command (char *count_string, int from_tty)
+step_command (const char *count_string, int from_tty)
{
step_1 (0, 0, count_string);
}
/* Likewise, but skip over subroutine calls as if single instructions. */
static void
-next_command (char *count_string, int from_tty)
+next_command (const char *count_string, int from_tty)
{
step_1 (1, 0, count_string);
}
/* Likewise, but step only one instruction. */
static void
-stepi_command (char *count_string, int from_tty)
+stepi_command (const char *count_string, int from_tty)
{
step_1 (0, 1, count_string);
}
static void
-nexti_command (char *count_string, int from_tty)
+nexti_command (const char *count_string, int from_tty)
{
step_1 (1, 1, count_string);
}
static int prepare_one_step (struct step_command_fsm *sm);
static void
-step_1 (int skip_subroutines, int single_inst, char *count_string)
+step_1 (int skip_subroutines, int single_inst, const char *count_string)
{
int count;
int async_exec;
/* Continue program at specified address. */
static void
-jump_command (char *arg, int from_tty)
+jump_command (const char *arg, int from_tty)
{
struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR addr;
/* Continue program giving it specified signal. */
static void
-signal_command (char *signum_exp, int from_tty)
+signal_command (const char *signum_exp, int from_tty)
{
enum gdb_signal oursig;
int async_exec;
/* Queue a signal to be delivered to the current thread. */
static void
-queue_signal_command (char *signum_exp, int from_tty)
+queue_signal_command (const char *signum_exp, int from_tty)
{
enum gdb_signal oursig;
struct thread_info *tp;
}
static void
-until_command (char *arg, int from_tty)
+until_command (const char *arg, int from_tty)
{
int async_exec;
}
static void
-advance_command (char *arg, int from_tty)
+advance_command (const char *arg, int from_tty)
{
int async_exec;
frame will return to, then continue. */
static void
-finish_command (char *arg, int from_tty)
+finish_command (const char *arg, int from_tty)
{
struct frame_info *frame;
int async_exec;
/* Add zero or more directories to the front of the execution path. */
static void
-path_command (char *dirname, int from_tty)
+path_command (const char *dirname, int from_tty)
{
char *exec_path;
const char *env;
and allows us to start debugging it. */
void
-attach_command (char *args, int from_tty)
+attach_command (const char *args, int from_tty)
{
int async_exec;
struct target_ops *attach_target;
stopped processes on some native platforms (e.g. GNU/Linux). */
static void
-disconnect_command (char *args, int from_tty)
+disconnect_command (const char *args, int from_tty)
{
dont_repeat (); /* Not for the faint of heart. */
query_if_trace_running (from_tty);
if the `-a' switch is used. */
static void
-interrupt_command (char *args, int from_tty)
+interrupt_command (const char *args, int from_tty)
{
if (target_can_async_p ())
{
/* remove-inferior ID */
static void
-remove_inferior_command (char *args, int from_tty)
+remove_inferior_command (const char *args, int from_tty)
{
if (args == NULL || *args == '\0')
error (_("Requires an argument (inferior id(s) to remove)"));
/* add-inferior [-copies N] [-exec FILENAME] */
static void
-add_inferior_command (char *args, int from_tty)
+add_inferior_command (const char *args, int from_tty)
{
int i, copies = 1;
gdb::unique_xmalloc_ptr<char> exec;
/* clone-inferior [-copies N] [ID] */
static void
-clone_inferior_command (char *args, int from_tty)
+clone_inferior_command (const char *args, int from_tty)
{
int i, copies = 1;
struct inferior *orginf = NULL;
extern void post_create_inferior (struct target_ops *, int);
-extern void attach_command (char *, int);
+extern void attach_command (const char *, int);
extern char *get_inferior_args (void);
-extern void set_inferior_args (char *);
+extern void set_inferior_args (const char *);
extern void set_inferior_args_vector (int, char **);
static void info_signals_command (char *, int);
-static void handle_command (char *, int);
-
static void sig_print_info (enum gdb_signal);
static void sig_print_header (void);
/* Specify how various signals in the inferior should be handled. */
static void
-handle_command (char *args, int from_tty)
+handle_command (const char *args, int from_tty)
{
int digits, wordlen;
int sigfirst, signum, siglast;
/* Provides the jit-reader-load command. */
static void
-jit_reader_load_command (char *args, int from_tty)
+jit_reader_load_command (const char *args, int from_tty)
{
if (args == NULL)
error (_("No reader name provided."));
/* Provides the jit-reader-unload command. */
static void
-jit_reader_unload_command (char *args, int from_tty)
+jit_reader_unload_command (const char *args, int from_tty)
{
if (!loaded_jit_reader)
error (_("No JIT reader loaded."));
}
static void
-checkpoint_command (char *args, int from_tty)
+checkpoint_command (const char *args, int from_tty)
{
struct objfile *fork_objf;
struct gdbarch *gdbarch;
/* Switch inferior process (checkpoint) context, by checkpoint id. */
static void
-restart_command (char *args, int from_tty)
+restart_command (const char *args, int from_tty)
{
struct fork_info *fp;
\f
static void
-mem_command (char *args, int from_tty)
+mem_command (const char *args, int from_tty)
{
CORE_ADDR lo, hi;
- char *tok;
if (!args)
error_no_arg (_("No mem"));
require_user_regions (from_tty);
- tok = strtok (args, " \t");
- if (!tok)
+ std::string tok = extract_arg (&args);
+ if (tok == "")
error (_("no lo address"));
- lo = parse_and_eval_address (tok);
+ lo = parse_and_eval_address (tok.c_str ());
- tok = strtok (NULL, " \t");
- if (!tok)
+ tok = extract_arg (&args);
+ if (tok == "")
error (_("no hi address"));
- hi = parse_and_eval_address (tok);
+ hi = parse_and_eval_address (tok.c_str ());
mem_attrib attrib;
- while ((tok = strtok (NULL, " \t")) != NULL)
+ while ((tok = extract_arg (&args)) != "")
{
- if (strcmp (tok, "rw") == 0)
+ if (tok == "rw")
attrib.mode = MEM_RW;
- else if (strcmp (tok, "ro") == 0)
+ else if (tok == "ro")
attrib.mode = MEM_RO;
- else if (strcmp (tok, "wo") == 0)
+ else if (tok == "wo")
attrib.mode = MEM_WO;
- else if (strcmp (tok, "8") == 0)
+ else if (tok == "8")
attrib.width = MEM_WIDTH_8;
- else if (strcmp (tok, "16") == 0)
+ else if (tok == "16")
{
if ((lo % 2 != 0) || (hi % 2 != 0))
error (_("region bounds not 16 bit aligned"));
attrib.width = MEM_WIDTH_16;
}
- else if (strcmp (tok, "32") == 0)
+ else if (tok == "32")
{
if ((lo % 4 != 0) || (hi % 4 != 0))
error (_("region bounds not 32 bit aligned"));
attrib.width = MEM_WIDTH_32;
}
- else if (strcmp (tok, "64") == 0)
+ else if (tok == "64")
{
if ((lo % 8 != 0) || (hi % 8 != 0))
error (_("region bounds not 64 bit aligned"));
}
#if 0
- else if (strcmp (tok, "hwbreak") == 0)
+ else if (tok == "hwbreak")
attrib.hwbreak = 1;
- else if (strcmp (tok, "swbreak") == 0)
+ else if (tok == "swbreak")
attrib.hwbreak = 0;
#endif
- else if (strcmp (tok, "cache") == 0)
+ else if (tok == "cache")
attrib.cache = 1;
- else if (strcmp (tok, "nocache") == 0)
+ else if (tok == "nocache")
attrib.cache = 0;
#if 0
- else if (strcmp (tok, "verify") == 0)
+ else if (tok == "verify")
attrib.verify = 1;
- else if (strcmp (tok, "noverify") == 0)
+ else if (tok == "noverify")
attrib.verify = 0;
#endif
else
- error (_("unknown attribute: %s"), tok);
+ error (_("unknown attribute: %s"), tok.c_str ());
}
create_user_mem_region (lo, hi, attrib);
}
static void
-print_object_command (char *args, int from_tty)
+print_object_command (const char *args, int from_tty)
{
struct value *object, *function, *description;
CORE_ADDR string_addr, object_addr;
}
static void
-print_command (char *exp, int from_tty)
+print_command (const char *exp, int from_tty)
{
print_command_1 (exp, 1);
}
/* Same as print, except it doesn't print void results. */
static void
-call_command (char *exp, int from_tty)
+call_command (const char *exp, int from_tty)
{
print_command_1 (exp, 0);
}
/* Implementation of the "output" command. */
static void
-output_command (char *exp, int from_tty)
+output_command (const char *exp, int from_tty)
{
output_command_const (exp, from_tty);
}
evaluate_expression (expr.get ());
}
-/* Temporary non-const version of set_command. */
-
-static void
-non_const_set_command (char *exp, int from_tty)
-{
- set_command (exp, from_tty);
-}
-
static void
info_symbol_command (char *arg, int from_tty)
{
\f
static void
-x_command (char *exp, int from_tty)
+x_command (const char *exp, int from_tty)
{
struct format_data fmt;
struct value *val;
Specify the expression. */
static void
-display_command (char *arg, int from_tty)
+display_command (const char *arg, int from_tty)
{
struct format_data fmt;
struct display *newobj;
/* Implement the "printf" command. */
static void
-printf_command (char *arg, int from_tty)
+printf_command (const char *arg, int from_tty)
{
ui_printf (arg, gdb_stdout);
gdb_flush (gdb_stdout);
/* Implement the "eval" command. */
static void
-eval_command (char *arg, int from_tty)
+eval_command (const char *arg, int from_tty)
{
string_file stb;
You can see these environment settings with the \"show\" command."),
&setlist, "set ", 1, &cmdlist);
if (dbx_commands)
- add_com ("assign", class_vars, non_const_set_command, _("\
+ add_com ("assign", class_vars, set_command, _("\
Evaluate expression EXP and assign result to variable VAR, using assignment\n\
syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n\
example). VAR may be a debugger \"convenience\" variable (names starting\n\
}
static void
-proc_trace_syscalls (char *args, int from_tty, int entry_or_exit, int mode)
+proc_trace_syscalls (const char *args, int from_tty, int entry_or_exit, int mode)
{
procinfo *pi;
}
static void
-proc_trace_sysentry_cmd (char *args, int from_tty)
+proc_trace_sysentry_cmd (const char *args, int from_tty)
{
proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_SET);
}
static void
-proc_trace_sysexit_cmd (char *args, int from_tty)
+proc_trace_sysexit_cmd (const char *args, int from_tty)
{
proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_SET);
}
static void
-proc_untrace_sysentry_cmd (char *args, int from_tty)
+proc_untrace_sysentry_cmd (const char *args, int from_tty)
{
proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_RESET);
}
static void
-proc_untrace_sysexit_cmd (char *args, int from_tty)
+proc_untrace_sysexit_cmd (const char *args, int from_tty)
{
proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_RESET);
}
/* Implementation of the gdb "python-interactive" command. */
static void
-python_interactive_command (char *arg, int from_tty)
+python_interactive_command (const char *arg, int from_tty)
{
struct ui *ui = current_ui;
int err;
/* Implementation of the gdb "python" command. */
static void
-python_command (char *arg, int from_tty)
+python_command (const char *arg, int from_tty)
{
gdbpy_enter enter_py (get_current_arch (), current_language);
command. */
static void
-python_interactive_command (char *arg, int from_tty)
+python_interactive_command (const char *arg, int from_tty)
{
arg = skip_spaces (arg);
if (arg && *arg)
}
static void
-python_command (char *arg, int from_tty)
+python_command (const char *arg, int from_tty)
{
python_interactive_command (arg, from_tty);
}
}
static void
-reg_flush_command (char *command, int from_tty)
+reg_flush_command (const char *command, int from_tty)
{
/* Force-flush the register cache. */
registers_changed ();
simulator must do any command interpretation work. */
void
-simulator_command (char *args, int from_tty)
+simulator_command (const char *args, int from_tty)
{
struct sim_inferior_data *sim_data;
#define SAMPLE_THREAD 0x05060708 /* Truncated 64 bit threadid. */
static void
-threadset_test_cmd (char *cmd, int tty)
+threadset_test_cmd (const char *cmd, int tty)
{
int sample_thread = SAMPLE_THREAD;
static void
-threadalive_test (char *cmd, int tty)
+threadalive_test (const char *cmd, int tty)
{
int sample_thread = SAMPLE_THREAD;
int pid = ptid_get_pid (inferior_ptid);
}
static void
-threadlist_test_cmd (char *cmd, int tty)
+threadlist_test_cmd (const char *cmd, int tty)
{
int startflag = 1;
threadref nextthread;
}
static void
-threadinfo_test_cmd (char *cmd, int tty)
+threadinfo_test_cmd (const char *cmd, int tty)
{
int athread = SAMPLE_THREAD;
threadref thread;
}
static void
-threadlist_update_test_cmd (char *cmd, int tty)
+threadlist_update_test_cmd (const char *cmd, int tty)
{
printf_filtered ("Remote Threadlist update test\n");
remote_threadlist_iterator (thread_display_step, 0, CRAZY_MAX_THREADS);
Used to implement reverse-next etc. commands. */
static void
-exec_reverse_once (const char *cmd, char *args, int from_tty)
+exec_reverse_once (const char *cmd, const char *args, int from_tty)
{
enum exec_direction_kind dir = execution_direction;
}
static void
-reverse_step (char *args, int from_tty)
+reverse_step (const char *args, int from_tty)
{
exec_reverse_once ("step", args, from_tty);
}
static void
-reverse_stepi (char *args, int from_tty)
+reverse_stepi (const char *args, int from_tty)
{
exec_reverse_once ("stepi", args, from_tty);
}
static void
-reverse_next (char *args, int from_tty)
+reverse_next (const char *args, int from_tty)
{
exec_reverse_once ("next", args, from_tty);
}
static void
-reverse_nexti (char *args, int from_tty)
+reverse_nexti (const char *args, int from_tty)
{
exec_reverse_once ("nexti", args, from_tty);
}
static void
-reverse_continue (char *args, int from_tty)
+reverse_continue (const char *args, int from_tty)
{
exec_reverse_once ("continue", args, from_tty);
}
static void
-reverse_finish (char *args, int from_tty)
+reverse_finish (const char *args, int from_tty)
{
exec_reverse_once ("finish", args, from_tty);
}
Up to us to free it as required. */
static void
-save_bookmark_command (char *args, int from_tty)
+save_bookmark_command (const char *args, int from_tty)
{
/* Get target's idea of a bookmark. */
gdb_byte *bookmark_id = target_get_bookmark (args, from_tty);
/* Implement "goto-bookmark" command. */
static void
-goto_bookmark_command (char *args, int from_tty)
+goto_bookmark_command (const char *args, int from_tty)
{
struct bookmark *b;
unsigned long num;
- char *p = args;
+ const char *p = args;
if (args == NULL || args[0] == '\0')
error (_("Command requires an argument."));
/* Implements the "sharedlibrary" command. */
static void
-sharedlibrary_command (char *args, int from_tty)
+sharedlibrary_command (const char *args, int from_tty)
{
dont_repeat ();
solib_add (args, from_tty, 1);
are not discarded. Also called from remote.c. */
void
-no_shared_libraries (char *ignored, int from_tty)
+no_shared_libraries (const char *ignored, int from_tty)
{
/* The order of the two routines below is important: clear_solib notifies
the solib_unloaded observers, and some of these observers might need
/* Discard symbols that were auto-loaded from shared libraries. */
-extern void no_shared_libraries (char *ignored, int from_tty);
+extern void no_shared_libraries (const char *ignored, int from_tty);
/* Set the solib operations for GDBARCH to NEW_OPS. */
static int get_filename_and_charpos (struct symtab *, char **);
-static void reverse_search_command (char *, int);
-
-static void forward_search_command (char *, int);
-
static void info_line_command (char *, int);
static void info_source_command (char *, int);
/* Commands to search the source file for a regexp. */
static void
-forward_search_command (char *regex, int from_tty)
+forward_search_command (const char *regex, int from_tty)
{
int c;
int desc;
}
static void
-reverse_search_command (char *regex, int from_tty)
+reverse_search_command (const char *regex, int from_tty)
{
int c;
int desc;
}
static void
-backtrace_command (char *arg_in, int from_tty)
+backtrace_command (const char *arg, int from_tty)
{
int fulltrace_arg = -1, arglen = 0, argc = 0, no_filters = -1;
int user_arg = 0;
- const char *arg = arg_in;
std::string reconstructed_arg;
if (arg)
no_filters >= 0 /* no frame-filters */, from_tty);
}
+/* Temporary non-const overload. */
+
+static void
+backtrace_command (char *arg, int from_tty)
+{
+ backtrace_command ((const char *) arg, from_tty);
+}
+
/* Iterate over the local variables of a block B, calling CB with
CB_DATA. */
the selected frame. */
static void
-frame_command (char *level_exp, int from_tty)
+frame_command (const char *level_exp, int from_tty)
{
struct frame_info *prev_frame = get_selected_frame_if_set ();
}
static void
-up_silently_command (char *count_exp, int from_tty)
+up_silently_command (const char *count_exp, int from_tty)
{
up_silently_base (count_exp);
}
static void
-up_command (char *count_exp, int from_tty)
+up_command (const char *count_exp, int from_tty)
{
up_silently_base (count_exp);
observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
}
static void
-down_silently_command (char *count_exp, int from_tty)
+down_silently_command (const char *count_exp, int from_tty)
{
down_silently_base (count_exp);
}
static void
-down_command (char *count_exp, int from_tty)
+down_command (const char *count_exp, int from_tty)
{
down_silently_base (count_exp);
observer_notify_user_selected_context_changed (USER_SELECTED_FRAME);
}
void
-return_command (char *retval_exp, int from_tty)
+return_command (const char *retval_exp, int from_tty)
{
/* Initialize it just to avoid a GCC false warning. */
enum return_value_convention rv_conv = RETURN_VALUE_STRUCT_CONVENTION;
};
static void
-func_command (char *arg, int from_tty)
+func_command (const char *arg, int from_tty)
{
struct frame_info *frame;
int found = 0;
/* Forward declarations for local functions. */
-static void rbreak_command (char *, int);
+static void rbreak_command (const char *, int);
static int find_line_common (struct linetable *, int, int *, int);
matches. */
static void
-symtab_symbol_info (char *regexp, enum search_domain kind, int from_tty)
+symtab_symbol_info (const char *regexp, enum search_domain kind, int from_tty)
{
static const char * const classnames[] =
{"variable", "function", "type"};
}
}
+static void
+info_variables_command (const char *regexp, int from_tty)
+{
+ symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty);
+}
+
+/* Temporary non-const overload. */
+
static void
info_variables_command (char *regexp, int from_tty)
{
}
static void
-rbreak_command (char *regexp, int from_tty)
+rbreak_command (const char *regexp, int from_tty)
{
std::string string;
const char **files = NULL;
if (regexp)
{
- char *colon = strchr (regexp, ':');
+ const char *colon = strchr (regexp, ':');
if (colon && *(colon + 1) != ':')
{
}
static void
-do_monitor_command (char *cmd,
- int from_tty)
+do_monitor_command (const char *cmd, int from_tty)
{
target_rcmd (cmd, gdb_stdtarg);
}
ignored. */
void
-flash_erase_command (char *cmd, int from_tty)
+flash_erase_command (const char *cmd, int from_tty)
{
/* Used to communicate termination of flash operations to the target. */
bool found_flash_region = false;
std::vector<mem_region> target_memory_map (void);
/* Erases all flash memory regions on the target. */
-void flash_erase_command (char *cmd, int from_tty);
+void flash_erase_command (const char *cmd, int from_tty);
/* Erase the specified flash region. */
void target_flash_erase (ULONGEST address, LONGEST length);
}
\f
static void
-dont_repeat_command (char *ignored, int from_tty)
+dont_repeat_command (const char *ignored, int from_tty)
{
/* Can't call dont_repeat here because we're not necessarily reading
from stdin. */
extern void command_loop (void);
extern int quit_confirm (void);
extern void quit_force (int *, int);
-extern void quit_command (char *, int);
+extern void quit_command (const char *, int);
extern void quit_cover (void);
extern void execute_command (char *, int);
}
static void
-tsave_command (char *args, int from_tty)
+tsave_command (const char *args, int from_tty)
{
int target_does_save = 0;
char **argv;
evaluate into an initial value. */
static void
-trace_variable_command (char *args, int from_tty)
+trace_variable_command (const char *args, int from_tty)
{
LONGEST initval = 0;
struct trace_state_variable *tsv;
- char *name_start, *p;
+ const char *name_start, *p;
if (!args || !*args)
error_no_arg (_("Syntax is $NAME [ = EXPR ]"));
which is always an error. */
static void
-end_actions_pseudocommand (char *args, int from_tty)
+end_actions_pseudocommand (const char *args, int from_tty)
{
error (_("This command cannot be used at the top level."));
}
static void
-while_stepping_pseudocommand (char *args, int from_tty)
+while_stepping_pseudocommand (const char *args, int from_tty)
{
error (_("This command can only be used in a tracepoint actions list."));
}
static void
-collect_pseudocommand (char *args, int from_tty)
+collect_pseudocommand (const char *args, int from_tty)
{
error (_("This command can only be used in a tracepoint actions list."));
}
static void
-teval_pseudocommand (char *args, int from_tty)
+teval_pseudocommand (const char *args, int from_tty)
{
error (_("This command can only be used in a tracepoint actions list."));
}
/* Enter a list of actions for a tracepoint. */
static void
-actions_command (char *args, int from_tty)
+actions_command (const char *args, int from_tty)
{
struct tracepoint *t;
}
void
-start_tracing (char *notes)
+start_tracing (const char *notes)
{
VEC(breakpoint_p) *tp_vec = NULL;
int ix;
anybody else messing with the target. */
static void
-tstart_command (char *args, int from_tty)
+tstart_command (const char *args, int from_tty)
{
dont_repeat (); /* Like "run", dangerous to repeat accidentally. */
of the trace run's status. */
static void
-tstop_command (char *args, int from_tty)
+tstop_command (const char *args, int from_tty)
{
if (!current_trace_status ()->running)
error (_("Trace is not running."));
}
void
-stop_tracing (char *note)
+stop_tracing (const char *note)
{
int ret;
VEC(breakpoint_p) *tp_vec = NULL;
/* tstatus command */
static void
-tstatus_command (char *args, int from_tty)
+tstatus_command (const char *args, int from_tty)
{
struct trace_status *ts = current_trace_status ();
int status, ix;
/* The tdump command. */
static void
-tdump_command (char *args, int from_tty)
+tdump_command (const char *args, int from_tty)
{
int stepping_frame = 0;
struct bp_location *loc;
extern void check_trace_running (struct trace_status *);
-extern void start_tracing (char *notes);
-extern void stop_tracing (char *notes);
+extern void start_tracing (const char *notes);
+extern void stop_tracing (const char *notes);
extern void trace_status_mi (int on_stop);
static void show_data (enum tui_layout_type);
static enum tui_layout_type next_layout (void);
static enum tui_layout_type prev_layout (void);
-static void tui_layout_command (char *, int);
+static void tui_layout_command (const char *, int);
static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
static void
-tui_layout_command (char *arg, int from_tty)
+tui_layout_command (const char *arg, int from_tty)
{
/* Switch to the selected layout. */
if (tui_set_layout_by_name (arg) != TUI_SUCCESS)
warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE);
-
}
/* Answer the previous layout to cycle to. */
const char *procname,
int lineno, CORE_ADDR addr);
-static void tui_update_command (char *, int);
+static void tui_update_command (const char *, int);
\f
/* Create the status line to display as much information as we can on
/* Command to update the display with the current execution point. */
static void
-tui_update_command (char *arg, int from_tty)
+tui_update_command (const char *arg, int from_tty)
{
char cmd[sizeof("frame 0")];
static enum tui_status tui_adjust_win_heights (struct tui_win_info *,
int);
static int new_height_ok (struct tui_win_info *, int);
-static void tui_set_tab_width_command (char *, int);
-static void tui_refresh_all_command (char *, int);
-static void tui_set_win_height_command (char *, int);
+static void tui_set_tab_width_command (const char *, int);
+static void tui_refresh_all_command (const char *, int);
+static void tui_set_win_height_command (const char *, int);
static void tui_all_windows_info (char *, int);
-static void tui_set_focus_command (char *, int);
-static void tui_scroll_forward_command (char *, int);
-static void tui_scroll_backward_command (char *, int);
-static void tui_scroll_left_command (char *, int);
-static void tui_scroll_right_command (char *, int);
-static void parse_scrolling_args (char *,
+static void tui_set_focus_command (const char *, int);
+static void tui_scroll_forward_command (const char *, int);
+static void tui_scroll_backward_command (const char *, int);
+static void tui_scroll_left_command (const char *, int);
+static void tui_scroll_right_command (const char *, int);
+static void parse_scrolling_args (const char *,
struct tui_win_info **,
int *);
static void
-tui_scroll_forward_command (char *arg, int from_tty)
+tui_scroll_forward_command (const char *arg, int from_tty)
{
int num_to_scroll = 1;
struct tui_win_info *win_to_scroll;
static void
-tui_scroll_backward_command (char *arg, int from_tty)
+tui_scroll_backward_command (const char *arg, int from_tty)
{
int num_to_scroll = 1;
struct tui_win_info *win_to_scroll;
static void
-tui_scroll_left_command (char *arg, int from_tty)
+tui_scroll_left_command (const char *arg, int from_tty)
{
int num_to_scroll;
struct tui_win_info *win_to_scroll;
static void
-tui_scroll_right_command (char *arg, int from_tty)
+tui_scroll_right_command (const char *arg, int from_tty)
{
int num_to_scroll;
struct tui_win_info *win_to_scroll;
/* Set focus to the window named by 'arg'. */
static void
-tui_set_focus (char *arg, int from_tty)
+tui_set_focus (const char *arg, int from_tty)
{
if (arg != (char *) NULL)
{
}
static void
-tui_set_focus_command (char *arg, int from_tty)
+tui_set_focus_command (const char *arg, int from_tty)
{
/* Make sure the curses mode is enabled. */
tui_enable ();
static void
-tui_refresh_all_command (char *arg, int from_tty)
+tui_refresh_all_command (const char *arg, int from_tty)
{
/* Make sure the curses mode is enabled. */
tui_enable ();
/* Set the tab width of the specified window. */
static void
-tui_set_tab_width_command (char *arg, int from_tty)
+tui_set_tab_width_command (const char *arg, int from_tty)
{
/* Make sure the curses mode is enabled. */
tui_enable ();
/* Set the height of the specified window. */
static void
-tui_set_win_height (char *arg, int from_tty)
+tui_set_win_height (const char *arg, int from_tty)
{
/* Make sure the curses mode is enabled. */
tui_enable ();
/* Set the height of the specified window, with va_list. */
static void
-tui_set_win_height_command (char *arg, int from_tty)
+tui_set_win_height_command (const char *arg, int from_tty)
{
/* Make sure the curses mode is enabled. */
tui_enable ();
static void
-parse_scrolling_args (char *arg,
+parse_scrolling_args (const char *arg,
struct tui_win_info **win_to_scroll,
int *num_to_scroll)
{
#include "extension.h"
#include "completer.h"
-static void ptype_command (char *, int);
-
-static void whatis_command (char *, int);
-
-static void whatis_exp (char *, int);
-
const struct type_print_options type_print_raw_options =
{
1, /* raw */
show is passed to type_print. */
static void
-whatis_exp (char *exp, int show)
+whatis_exp (const char *exp, int show)
{
struct value *val;
struct cleanup *old_chain;
}
static void
-whatis_command (char *exp, int from_tty)
+whatis_command (const char *exp, int from_tty)
{
/* Most of the time users do not want to see all the fields
in a structure. If they do they can use the "ptype" command.
/* TYPENAME is either the name of a type, or an expression. */
static void
-ptype_command (char *type_name, int from_tty)
+ptype_command (const char *type_name, int from_tty)
{
whatis_exp (type_name, 1);
}
/* If the variable does not already exist create it and give it the
value given. If no value is given then the default is zero. */
static void
-init_if_undefined_command (char* args, int from_tty)
+init_if_undefined_command (const char* args, int from_tty)
{
struct internalvar* intvar;
}
static void
-signal_event_command (char *args, int from_tty)
+signal_event_command (const char *args, int from_tty)
{
uintptr_t event_id = 0;
char *endargs = NULL;