+2017-10-11 Tom Tromey <tom@tromey.com>
+
+ * gdbthread.h (thread_command): Constify.
+ * inferior.h (detach_command): Constify.
+ * top.h (set_history, show_history): Constify.
+ * arm-tdep.c (set_arm_command, show_arm_command): Constify.
+ * serial.c (serial_set_cmd, serial_show_cmd): Constify.
+ * bsd-kvm.c (bsd_kvm_cmd): Constify.
+ * printcmd.c (set_command): Constify.
+ (non_const_set_command): New function.
+ * dcache.c (set_dcache_command, show_dcache_command): Constify.
+ * breakpoint.c (enable_command, disable_command, delete_command)
+ (catch_command, tcatch_command, set_breakpoint_cmd)
+ (show_breakpoint_cmd): Constify.
+ * macrocmd.c (macro_command): Constify.
+ * infcmd.c (unset_command, kill_command, detach_command)
+ (info_proc_cmd): Constify.
+ * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
+ * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
+ (info_auto_load_cmd): Constify.
+ * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
+ (unset_tdesc_cmd): Constify.
+ * ada-lang.c (set_ada_command, show_ada_command)
+ (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
+ * guile/guile.c (set_guile_command, show_guile_command)
+ (info_guile_command): Constify.
+ * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
+ Constify.
+ * skip.c (skip_command): Constify.
+ * compile/compile.c (_initialize_compile): Constify.
+ * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
+ * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
+ (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
+ (maint_btrace_pt_show_cmd): Constify.
+ * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
+ Constify.
+ * python/python.c (user_show_python, user_set_python): Constify.
+ * mips-tdep.c (set_mips_command, show_mips_command)
+ (set_mipsfpu_command): Constify.
+ * record-btrace.c (cmd_record_btrace_start)
+ (cmd_set_record_btrace, cmd_show_record_btrace)
+ (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
+ (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
+ * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
+ Constify.
+ * symfile.c (overlay_command): Constify.
+ * spu-tdep.c (set_spu_command, show_spu_command): Constify.
+ * cli/cli-logging.c (set_logging_command, show_logging_command):
+ Constify.
+ * cli/cli-dump.c (dump_command, append_command)
+ (srec_dump_command, ihex_dump_command, verilog_dump_command)
+ (tekhex_dump_command, binary_dump_command)
+ (binary_append_command): Constify.
+ * cli/cli-decode.c (struct cmd_list_element): Change type of
+ "fun".
+ * cli/cli-cmds.c (info_command, show_command, set_debug)
+ (show_debug): Constify.
+ (show_command): Add non-const overload.
+ * top.c (set_history, show_history): Constify.
+ * sh-tdep.c (set_sh_command, show_sh_command): Constify.
+ * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
+ * target.c (target_command): Constify.
+ * sparc64-tdep.c (info_adi_command): Constify.
+ * record-full.c (cmd_record_full_start): Constify.
+ (set_record_full_command): Constify. Fix typo.
+ (show_record_full_command): Constify.
+ * thread.c (thread_command, thread_apply_command): Constify.
+ * memattr.c (dummy_cmd): Constify.
+ * value.c (function_command): Constify.
+ * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
+ * probe.c (info_probes_command): Constify.
+ * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
+ * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
+ (show_thread_cmd, set_thread_default_cmd)
+ (show_thread_default_cmd): Constify.
+ (check_empty): Constify.
+ * tracepoint.c (tfind_command): Constify.
+ * cp-support.c (maint_cplus_command): Constify.
+ * windows-tdep.c (info_w32_command): Constify.
+ * record.c (cmd_record_start, set_record_command)
+ (show_record_command, info_record_command, cmd_record_goto):
+ Constify.
+ * ravenscar-thread.c (set_ravenscar_command)
+ (show_ravenscar_command): Constify.
+ * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
+ Constify.
+ (add_internal_problem_command): Remove casts.
+ * arc-tdep.c (maintenance_print_arc_command): Constify.
+ * valprint.c (set_print, show_print, set_print_raw)
+ (show_print_raw): Constify.
+ * maint.c (maintenance_command, maintenance_info_command)
+ (maintenance_print_command, maintenance_set_cmd)
+ (maintenance_show_cmd, set_per_command_cmd)
+ (show_per_command_cmd, maintenance_check_command): Constify.
+ * language.c (set_check, show_check): Constify.
+ * typeprint.c (show_print_type, set_print_type): Constify.
+ * go32-nat.c (go32_info_dos_command): Constify.
+
2017-10-11 Tom Tromey <tom@tromey.com>
* breakpoint.c (prepare_re_set_context): Remove.
/* Implement the "maintenance set ada" (prefix) command. */
static void
-maint_set_ada_cmd (char *args, int from_tty)
+maint_set_ada_cmd (const char *args, int from_tty)
{
help_list (maint_set_ada_cmdlist, "maintenance set ada ", all_commands,
gdb_stdout);
/* Implement the "maintenance show ada" (prefix) command. */
static void
-maint_show_ada_cmd (char *args, int from_tty)
+maint_show_ada_cmd (const char *args, int from_tty)
{
cmd_show_list (maint_show_ada_cmdlist, from_tty, "");
}
/* Implement the "set ada" prefix command. */
static void
-set_ada_command (char *arg, int from_tty)
+set_ada_command (const char *arg, int from_tty)
{
printf_unfiltered (_(\
"\"set ada\" must be followed by the name of a setting.\n"));
/* Implement the "show ada" prefix command. */
static void
-show_ada_command (char *args, int from_tty)
+show_ada_command (const char *args, int from_tty)
{
cmd_show_list (show_ada_list, from_tty, "");
}
/* Wrapper for "maintenance print arc" list of commands. */
static void
-maintenance_print_arc_command (char *args, int from_tty)
+maintenance_print_arc_command (const char *args, int from_tty)
{
cmd_show_list (maintenance_print_arc_list, from_tty, "");
}
}
static void
-set_arm_command (char *args, int from_tty)
+set_arm_command (const char *args, int from_tty)
{
printf_unfiltered (_("\
\"set arm\" must be followed by an apporpriate subcommand.\n"));
}
static void
-show_arm_command (char *args, int from_tty)
+show_arm_command (const char *args, int from_tty)
{
cmd_show_list (showarmcmdlist, from_tty, "");
}
/* The only valid "set auto-load" argument is off|0|no|disable. */
static void
-set_auto_load_cmd (char *args, int from_tty)
+set_auto_load_cmd (const char *args, int from_tty)
{
struct cmd_list_element *list;
size_t length;
"show auto-load " settings. */
static void
-show_auto_load_cmd (char *args, int from_tty)
+show_auto_load_cmd (const char *args, int from_tty)
{
cmd_show_list (*auto_load_show_cmdlist_get (), from_tty, "");
}
newlines at proper places. */
static void
-info_auto_load_cmd (char *args, int from_tty)
+info_auto_load_cmd (const char *args, int from_tty)
{
struct cmd_list_element *list;
struct cleanup *infolist_chain;
/* Prototypes for local functions. */
-static void disable_command (char *, int);
-
-static void enable_command (char *, int);
-
static void map_breakpoint_numbers (const char *,
gdb::function_view<void (breakpoint *)>);
static void clear_command (char *, int);
-static void catch_command (char *, int);
-
static int can_use_hardware_watchpoint (struct value *);
static void mention (struct breakpoint *);
static void stop_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 incref_bp_location (struct bp_location *loc);
static void decref_bp_location (struct bp_location **loc);
}
static void
-catch_command (char *arg, int from_tty)
+catch_command (const char *arg, int from_tty)
{
error (_("Catch requires an event name."));
}
\f
static void
-tcatch_command (char *arg, int from_tty)
+tcatch_command (const char *arg, int from_tty)
{
error (_("Catch requires an event name."));
}
}
static void
-delete_command (char *arg, int from_tty)
+delete_command (const char *arg, int from_tty)
{
struct breakpoint *b, *b_tmp;
}
static void
-disable_command (char *args, int from_tty)
+disable_command (const char *args, int from_tty)
{
if (args == 0)
{
in stopping the inferior. */
static void
-enable_command (char *args, int from_tty)
+enable_command (const char *args, int from_tty)
{
if (args == 0)
{
}
\f
static void
-set_breakpoint_cmd (char *args, int from_tty)
+set_breakpoint_cmd (const char *args, int from_tty)
{
}
static void
-show_breakpoint_cmd (char *args, int from_tty)
+show_breakpoint_cmd (const char *args, int from_tty)
{
}
}
static void
-save_command (char *arg, int from_tty)
+save_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"save\" must be followed by "
"the name of a save subcommand.\n"));
struct cmd_list_element *bsd_kvm_cmdlist;
static void
-bsd_kvm_cmd (char *arg, int fromtty)
+bsd_kvm_cmd (const char *arg, int fromtty)
{
/* ??? Should this become an alias for "target kvm"? */
}
/* The "maintenance btrace" command. */
static void
-maint_btrace_cmd (char *args, int from_tty)
+maint_btrace_cmd (const char *args, int from_tty)
{
help_list (maint_btrace_cmdlist, "maintenance btrace ", all_commands,
gdb_stdout);
/* The "maintenance set btrace" command. */
static void
-maint_btrace_set_cmd (char *args, int from_tty)
+maint_btrace_set_cmd (const char *args, int from_tty)
{
help_list (maint_btrace_set_cmdlist, "maintenance set btrace ", all_commands,
gdb_stdout);
/* The "maintenance show btrace" command. */
static void
-maint_btrace_show_cmd (char *args, int from_tty)
+maint_btrace_show_cmd (const char *args, int from_tty)
{
help_list (maint_btrace_show_cmdlist, "maintenance show btrace ",
all_commands, gdb_stdout);
/* The "maintenance set btrace pt" command. */
static void
-maint_btrace_pt_set_cmd (char *args, int from_tty)
+maint_btrace_pt_set_cmd (const char *args, int from_tty)
{
help_list (maint_btrace_pt_set_cmdlist, "maintenance set btrace pt ",
all_commands, gdb_stdout);
/* The "maintenance show btrace pt" command. */
static void
-maint_btrace_pt_show_cmd (char *args, int from_tty)
+maint_btrace_pt_show_cmd (const char *args, int from_tty)
{
help_list (maint_btrace_pt_show_cmdlist, "maintenance show btrace pt ",
all_commands, gdb_stdout);
static void help_command (char *, int);
-static void show_command (char *, int);
-
-static void info_command (char *, int);
-
-static void show_debug (char *, int);
-
-static void set_debug (char *, int);
-
static void make_command (char *, int);
static void shell_escape (const char *, int);
args. */
static void
-info_command (char *arg, int from_tty)
+info_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"info\" must be followed by "
"the name of an info command.\n"));
/* The "show" command with no arguments shows all the settings. */
+static void
+show_command (const char *arg, int from_tty)
+{
+ cmd_show_list (showlist, from_tty, "");
+}
+
+/* A temporary non-const overload of show_command. */
+
static void
show_command (char *arg, int from_tty)
{
cmd_show_list (showlist, from_tty, "");
}
+
\f
/* Provide documentation on command or list given by COMMAND. FROM_TTY
is ignored. */
}
static void
-set_debug (char *arg, int from_tty)
+set_debug (const char *arg, int from_tty)
{
printf_unfiltered (_("\"set debug\" must be followed by "
"the name of a debug subcommand.\n"));
}
static void
-show_debug (char *args, int from_tty)
+show_debug (const char *args, int from_tty)
{
cmd_show_list (showdebuglist, from_tty, "");
}
struct cmd_list_element *
add_prefix_cmd (const char *name, enum command_class theclass,
- cmd_cfunc_ftype *fun,
+ cmd_const_cfunc_ftype *fun,
const char *doc, struct cmd_list_element **prefixlist,
const char *prefixname, int allow_unknown,
struct cmd_list_element **list)
static struct cmd_list_element *binary_append_cmdlist;
static void
-dump_command (char *cmd, int from_tty)
+dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump\" must be followed by a subcommand.\n\n"));
help_list (dump_cmdlist, "dump ", all_commands, gdb_stdout);
}
static void
-append_command (char *cmd, int from_tty)
+append_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"append\" must be followed by a subcommand.\n\n"));
help_list (dump_cmdlist, "append ", all_commands, gdb_stdout);
}
static void
-srec_dump_command (char *cmd, int from_tty)
+srec_dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump srec\" must be followed by a subcommand.\n"));
help_list (srec_cmdlist, "dump srec ", all_commands, gdb_stdout);
}
static void
-ihex_dump_command (char *cmd, int from_tty)
+ihex_dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump ihex\" must be followed by a subcommand.\n"));
help_list (ihex_cmdlist, "dump ihex ", all_commands, gdb_stdout);
}
static void
-verilog_dump_command (char *cmd, int from_tty)
+verilog_dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump verilog\" must be followed by a subcommand.\n"));
help_list (verilog_cmdlist, "dump verilog ", all_commands, gdb_stdout);
}
static void
-tekhex_dump_command (char *cmd, int from_tty)
+tekhex_dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump tekhex\" must be followed by a subcommand.\n"));
help_list (tekhex_cmdlist, "dump tekhex ", all_commands, gdb_stdout);
}
static void
-binary_dump_command (char *cmd, int from_tty)
+binary_dump_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"dump binary\" must be followed by a subcommand.\n"));
help_list (binary_dump_cmdlist, "dump binary ", all_commands, gdb_stdout);
}
static void
-binary_append_command (char *cmd, int from_tty)
+binary_append_command (const char *cmd, int from_tty)
{
printf_unfiltered (_("\"append binary\" must be followed by a subcommand.\n"));
help_list (binary_append_cmdlist, "append binary ", all_commands,
}
static void
-set_logging_command (char *args, int from_tty)
+set_logging_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"set logging\" lets you log output to a file.\n"
"Usage: set logging on [FILENAME]\n"
}
static void
-show_logging_command (char *args, int from_tty)
+show_logging_command (const char *args, int from_tty)
{
if (saved_filename)
printf_unfiltered (_("Currently logging to \"%s\".\n"), saved_filename);
extern struct cmd_list_element *add_prefix_cmd (const char *, enum command_class,
- cmd_cfunc_ftype *fun,
+ cmd_const_cfunc_ftype *fun,
const char *,
struct cmd_list_element **,
const char *, int,
/* The "compile" prefix command. */
static void
-compile_command (char *args, int from_tty)
+compile_command (const char *args, int from_tty)
{
/* If a sub-command is not specified to the compile prefix command,
assume it is a direct code compilation. */
struct cmd_list_element *maint_cplus_cmd_list = NULL;
-/* The actual commands. */
-
-static void maint_cplus_command (char *arg, int from_tty);
-
/* A list of typedefs which should not be substituted by replace_typedefs. */
static const char * const ignore_typedefs[] =
{
/* Don't allow just "maintenance cplus". */
static void
-maint_cplus_command (char *arg, int from_tty)
+maint_cplus_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance cplus\" must be followed "
"by the name of a command.\n"));
}
static void
-set_dcache_command (char *arg, int from_tty)
+set_dcache_command (const char *arg, int from_tty)
{
printf_unfiltered (
"\"set dcache\" must be followed by the name of a subcommand.\n");
}
static void
-show_dcache_command (char *args, int from_tty)
+show_dcache_command (const char *args, int from_tty)
{
cmd_show_list (dcache_show_list, from_tty, "");
}
static struct cmd_list_element *show_dwarf_cmdlist;
static void
-set_dwarf_cmd (char *args, int from_tty)
+set_dwarf_cmd (const char *args, int from_tty)
{
help_list (set_dwarf_cmdlist, "maintenance set dwarf ", all_commands,
gdb_stdout);
}
static void
-show_dwarf_cmd (char *args, int from_tty)
+show_dwarf_cmd (const char *args, int from_tty)
{
cmd_show_list (show_dwarf_cmdlist, from_tty, "");
}
static struct cmd_list_element *show_backtrace_cmdlist;
static void
-set_backtrace_cmd (char *args, int from_tty)
+set_backtrace_cmd (const char *args, int from_tty)
{
help_list (set_backtrace_cmdlist, "set backtrace ", all_commands,
gdb_stdout);
}
static void
-show_backtrace_cmd (char *args, int from_tty)
+show_backtrace_cmd (const char *args, int from_tty)
{
cmd_show_list (show_backtrace_cmdlist, from_tty, "");
}
/* Commands with a prefix of `thread'. */
extern struct cmd_list_element *thread_cmd_list;
-extern void thread_command (char *tidstr, int from_tty);
+extern void thread_command (const char *tidstr, int from_tty);
/* Print notices on thread events (attach, detach, etc.), set with
`set print thread-events'. */
struct cmd_list_element *show_thread_default_cmd_list = NULL;
static void
-set_thread_cmd (char *args, int from_tty)
+set_thread_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"set thread\" must be followed by the "
"name of a thread property, or \"default\".\n");
}
static void
-show_thread_cmd (char *args, int from_tty)
+show_thread_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"show thread\" must be followed by the "
"name of a thread property, or \"default\".\n");
}
static void
-set_thread_default_cmd (char *args, int from_tty)
+set_thread_default_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"set thread default\" must be followed "
"by the name of a thread property.\n");
}
static void
-show_thread_default_cmd (char *args, int from_tty)
+show_thread_default_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"show thread default\" must be followed "
"by the name of a thread property.\n");
_parse_bool_arg (args, "on", "off", cmd_prefix)
static void
-check_empty (char *args, char *cmd_prefix)
+check_empty (const char *args, char *cmd_prefix)
{
if (args)
error (_("Garbage after \"%s\" command: `%s'"), cmd_prefix, args);
\f
static void
-set_task_cmd (char *args, int from_tty)
+set_task_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"set task\" must be followed by the name"
" of a task property.\n");
}
static void
-show_task_cmd (char *args, int from_tty)
+show_task_cmd (const char *args, int from_tty)
{
struct inf *inf = cur_inf ();
static struct cmd_list_element *info_dos_cmdlist = NULL;
static void
-go32_info_dos_command (char *args, int from_tty)
+go32_info_dos_command (const char *args, int from_tty)
{
help_list (info_dos_cmdlist, "info dos ", class_info, gdb_stdout);
}
/* Function for use by 'set guile' prefix command. */
static void
-set_guile_command (char *args, int from_tty)
+set_guile_command (const char *args, int from_tty)
{
help_list (set_guile_list, "set guile ", all_commands, gdb_stdout);
}
/* Function for use by 'show guile' prefix command. */
static void
-show_guile_command (char *args, int from_tty)
+show_guile_command (const char *args, int from_tty)
{
cmd_show_list (show_guile_list, from_tty, "");
}
"info scheme" with no args. */
static void
-info_guile_command (char *args, int from_tty)
+info_guile_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"info guile\" must be followed"
" by the name of an info command.\n"));
/* Helper function for the CLI commands. */
static void
-set_mpx_cmd (char *args, int from_tty)
+set_mpx_cmd (const char *args, int from_tty)
{
help_list (mpx_set_cmdlist, "set mpx ", all_commands, gdb_stdout);
}
/* Helper function for the CLI commands. */
static void
-show_mpx_cmd (char *args, int from_tty)
+show_mpx_cmd (const char *args, int from_tty)
{
cmd_show_list (mpx_show_cmdlist, from_tty, "");
}
static void path_command (char *, int);
-static void unset_command (char *, int);
-
static void info_float_command (char *, int);
static void disconnect_command (char *, int);
/* Kill the inferior process. Make us have no inferior. */
static void
-kill_command (char *arg, int from_tty)
+kill_command (const char *arg, int from_tty)
{
/* FIXME: This should not really be inferior_ptid (or target_has_execution).
It should be a distinct flag that indicates that a target is active, cuz
*/
void
-detach_command (char *args, int from_tty)
+detach_command (const char *args, int from_tty)
{
dont_repeat (); /* Not for the faint of heart. */
}
\f
static void
-unset_command (char *args, int from_tty)
+unset_command (const char *args, int from_tty)
{
printf_filtered (_("\"unset\" must be followed by the "
"name of an unset subcommand.\n"));
/* Implement `info proc' when given without any futher parameters. */
static void
-info_proc_cmd (char *args, int from_tty)
+info_proc_cmd (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_MINIMAL, from_tty);
}
extern void delete_longjmp_breakpoint_cleanup (void *arg);
-extern void detach_command (char *, int);
+extern void detach_command (const char *, int);
extern void notice_new_inferior (ptid_t, int, int);
static int unk_lang_parser (struct parser_state *);
-static void show_check (char *, int);
-
-static void set_check (char *, int);
-
static void set_range_case (void);
static void unk_lang_emit_char (int c, struct type *type,
}
static void
-set_check (char *ignore, int from_tty)
+set_check (const char *ignore, int from_tty)
{
printf_unfiltered (
"\"set check\" must be followed by the name of a check subcommand.\n");
}
static void
-show_check (char *ignore, int from_tty)
+show_check (const char *ignore, int from_tty)
{
cmd_show_list (showchecklist, from_tty, "");
}
static struct cmd_list_element *macrolist;
static void
-macro_command (char *arg, int from_tty)
+macro_command (const char *arg, int from_tty)
{
printf_unfiltered
("\"macro\" must be followed by the name of a macro command.\n");
#include "cli/cli-utils.h"
#include "cli/cli-setshow.h"
-static void maintenance_command (char *, int);
-
static void maintenance_internal_error (char *args, int from_tty);
static void maintenance_space_display (char *, int);
-static void maintenance_info_command (char *, int);
-
-static void maintenance_print_command (char *, int);
-
static void maintenance_do_deprecate (const char *, int);
/* Set this to the maximum number of seconds to wait instead of waiting forever
/* Access the maintenance subcommands. */
static void
-maintenance_command (char *args, int from_tty)
+maintenance_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"maintenance\" must be followed by "
"the name of a maintenance command.\n"));
"maintenance info" with no args. */
static void
-maintenance_info_command (char *arg, int from_tty)
+maintenance_info_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance info\" must be followed "
"by the name of an info command.\n"));
"maintenance check" with no args. */
static void
-maintenance_check_command (char *arg, int from_tty)
+maintenance_check_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance check\" must be followed "
"by the name of a check command.\n"));
"maintenance print" with no args. */
static void
-maintenance_print_command (char *arg, int from_tty)
+maintenance_print_command (const char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance print\" must be followed "
"by the name of a print command.\n"));
struct cmd_list_element *maintenance_show_cmdlist;
static void
-maintenance_set_cmd (char *args, int from_tty)
+maintenance_set_cmd (const char *args, int from_tty)
{
printf_unfiltered (_("\"maintenance set\" must be followed "
"by the name of a set command.\n"));
}
static void
-maintenance_show_cmd (char *args, int from_tty)
+maintenance_show_cmd (const char *args, int from_tty)
{
cmd_show_list (maintenance_show_cmdlist, from_tty, "");
}
In this case have "mt set per-command on|off" affect every setting. */
static void
-set_per_command_cmd (char *args, int from_tty)
+set_per_command_cmd (const char *args, int from_tty)
{
struct cmd_list_element *list;
int val;
"show per-command " settings. */
static void
-show_per_command_cmd (char *args, int from_tty)
+show_per_command_cmd (const char *args, int from_tty)
{
cmd_show_list (per_command_showlist, from_tty, "");
}
}
static void
-dummy_cmd (char *args, int from_tty)
+dummy_cmd (const char *args, int from_tty)
{
}
used for all MIPS-specific commands. */
static void
-show_mips_command (char *args, int from_tty)
+show_mips_command (const char *args, int from_tty)
{
help_list (showmipscmdlist, "show mips ", all_commands, gdb_stdout);
}
static void
-set_mips_command (char *args, int from_tty)
+set_mips_command (const char *args, int from_tty)
{
printf_unfiltered
("\"set mips\" must be followed by an appropriate subcommand.\n");
static void
-set_mipsfpu_command (char *args, int from_tty)
+set_mipsfpu_command (const char *args, int from_tty)
{
printf_unfiltered ("\"set mipsfpu\" must be followed by \"double\", "
"\"single\",\"none\" or \"auto\".\n");
}
static void
-set_command (char *exp, int from_tty)
+set_command (const char *exp, int from_tty)
{
expression_up expr = parse_expression (exp);
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)
{
You can see these environment settings with the \"show\" command."),
&setlist, "set ", 1, &cmdlist);
if (dbx_commands)
- add_com ("assign", class_vars, set_command, _("\
+ add_com ("assign", class_vars, non_const_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\
/* Implementation of the `info probes' command. */
static void
-info_probes_command (char *arg, int from_tty)
+info_probes_command (const char *arg, int from_tty)
{
info_probes_for_ops (arg, from_tty, NULL);
}
/* Function for use by 'set python' prefix command. */
static void
-user_set_python (char *args, int from_tty)
+user_set_python (const char *args, int from_tty)
{
help_list (user_set_python_list, "set python ", all_commands,
gdb_stdout);
/* Function for use by 'show python' prefix command. */
static void
-user_show_python (char *args, int from_tty)
+user_show_python (const char *args, int from_tty)
{
cmd_show_list (user_show_python_list, from_tty, "");
}
/* Implement the "set ravenscar" prefix command. */
static void
-set_ravenscar_command (char *arg, int from_tty)
+set_ravenscar_command (const char *arg, int from_tty)
{
printf_unfiltered (_(\
"\"set ravenscar\" must be followed by the name of a setting.\n"));
/* Implement the "show ravenscar" prefix command. */
static void
-show_ravenscar_command (char *args, int from_tty)
+show_ravenscar_command (const char *args, int from_tty)
{
cmd_show_list (show_ravenscar_list, from_tty, "");
}
/* Alias for "target record". */
static void
-cmd_record_btrace_start (char *args, int from_tty)
+cmd_record_btrace_start (const char *args, int from_tty)
{
if (args != NULL && *args != 0)
error (_("Invalid argument."));
/* The "set record btrace" command. */
static void
-cmd_set_record_btrace (char *args, int from_tty)
+cmd_set_record_btrace (const char *args, int from_tty)
{
cmd_show_list (set_record_btrace_cmdlist, from_tty, "");
}
/* The "show record btrace" command. */
static void
-cmd_show_record_btrace (char *args, int from_tty)
+cmd_show_record_btrace (const char *args, int from_tty)
{
cmd_show_list (show_record_btrace_cmdlist, from_tty, "");
}
/* The "set record btrace bts" command. */
static void
-cmd_set_record_btrace_bts (char *args, int from_tty)
+cmd_set_record_btrace_bts (const char *args, int from_tty)
{
printf_unfiltered (_("\"set record btrace bts\" must be followed "
"by an appropriate subcommand.\n"));
/* The "show record btrace bts" command. */
static void
-cmd_show_record_btrace_bts (char *args, int from_tty)
+cmd_show_record_btrace_bts (const char *args, int from_tty)
{
cmd_show_list (show_record_btrace_bts_cmdlist, from_tty, "");
}
/* The "set record btrace pt" command. */
static void
-cmd_set_record_btrace_pt (char *args, int from_tty)
+cmd_set_record_btrace_pt (const char *args, int from_tty)
{
printf_unfiltered (_("\"set record btrace pt\" must be followed "
"by an appropriate subcommand.\n"));
/* The "show record btrace pt" command. */
static void
-cmd_show_record_btrace_pt (char *args, int from_tty)
+cmd_show_record_btrace_pt (const char *args, int from_tty)
{
cmd_show_list (show_record_btrace_pt_cmdlist, from_tty, "");
}
/* Alias for "target record-full". */
static void
-cmd_record_full_start (char *args, int from_tty)
+cmd_record_full_start (const char *args, int from_tty)
{
execute_command ((char *) "target record-full", from_tty);
}
/* The "set record full" command. */
static void
-set_record_full_command (char *args, int from_tty)
+set_record_full_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"set record full\" must be followed "
- "by an apporpriate subcommand.\n"));
+ "by an appropriate subcommand.\n"));
help_list (set_record_full_cmdlist, "set record full ", all_commands,
gdb_stdout);
}
/* The "show record full" command. */
static void
-show_record_full_command (char *args, int from_tty)
+show_record_full_command (const char *args, int from_tty)
{
cmd_show_list (show_record_full_cmdlist, from_tty, "");
}
/* Alias for "target record". */
static void
-cmd_record_start (char *args, int from_tty)
+cmd_record_start (const char *args, int from_tty)
{
execute_command ((char *) "target record-full", from_tty);
}
/* The "set record" command. */
static void
-set_record_command (char *args, int from_tty)
+set_record_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"set record\" must be followed "
"by an apporpriate subcommand.\n"));
/* The "show record" command. */
static void
-show_record_command (char *args, int from_tty)
+show_record_command (const char *args, int from_tty)
{
cmd_show_list (show_record_cmdlist, from_tty, "");
}
/* The "info record" command. */
static void
-info_record_command (char *args, int from_tty)
+info_record_command (const char *args, int from_tty)
{
struct target_ops *t;
Rewinds the recording (forward or backward) to the given instruction. */
static void
-cmd_record_goto (char *arg, int from_tty)
+cmd_record_goto (const char *arg, int from_tty)
{
record_goto (arg);
}
}
static void
-remote_command (char *args, int from_tty)
+remote_command (const char *args, int from_tty)
{
help_list (remote_cmdlist, "remote ", all_commands, gdb_stdout);
}
}
static void
-set_remote_cmd (char *args, int from_tty)
+set_remote_cmd (const char *args, int from_tty)
{
help_list (remote_set_cmdlist, "set remote ", all_commands, gdb_stdout);
}
static void
-show_remote_cmd (char *args, int from_tty)
+show_remote_cmd (const char *args, int from_tty)
{
/* We can't just use cmd_show_list here, because we want to skip
the redundant "show remote Z-packet" and the legacy aliases. */
/* PowerPC-specific commands. */
static void
-set_powerpc_command (char *args, int from_tty)
+set_powerpc_command (const char *args, int from_tty)
{
printf_unfiltered (_("\
\"set powerpc\" must be followed by an appropriate subcommand.\n"));
}
static void
-show_powerpc_command (char *args, int from_tty)
+show_powerpc_command (const char *args, int from_tty)
{
cmd_show_list (showpowerpccmdlist, from_tty, "");
}
/* Support for "set tcp" and "show tcp" commands. */
static void
-set_tcp_cmd (char *args, int from_tty)
+set_tcp_cmd (const char *args, int from_tty)
{
help_list (tcp_set_cmdlist, "set tcp ", all_commands, gdb_stdout);
}
static void
-show_tcp_cmd (char *args, int from_tty)
+show_tcp_cmd (const char *args, int from_tty)
{
help_list (tcp_show_cmdlist, "show tcp ", all_commands, gdb_stdout);
}
static struct cmd_list_element *serial_show_cmdlist;
static void
-serial_set_cmd (char *args, int from_tty)
+serial_set_cmd (const char *args, int from_tty)
{
printf_unfiltered ("\"set serial\" must be followed "
"by the name of a command.\n");
}
static void
-serial_show_cmd (char *args, int from_tty)
+serial_show_cmd (const char *args, int from_tty)
{
cmd_show_list (serial_show_cmdlist, from_tty, "");
}
}
static void
-show_sh_command (char *args, int from_tty)
+show_sh_command (const char *args, int from_tty)
{
help_list (showshcmdlist, "show sh ", all_commands, gdb_stdout);
}
static void
-set_sh_command (char *args, int from_tty)
+set_sh_command (const char *args, int from_tty)
{
printf_unfiltered
("\"set sh\" must be followed by an appropriate subcommand.\n");
/* Process "skip ..." that does not match "skip file" or "skip function". */
static void
-skip_command (char *arg, int from_tty)
+skip_command (const char *arg, int from_tty)
{
const char *file = NULL;
const char *gfile = NULL;
}
static void
-info_adi_command (char *args, int from_tty)
+info_adi_command (const char *args, int from_tty)
{
printf_unfiltered ("\"adi\" must be followed by \"examine\" "
"or \"assign\".\n");
}
static void
-info_spu_command (char *args, int from_tty)
+info_spu_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"info spu\" must be followed by "
"the name of an SPU facility.\n"));
/* Root of all "set spu "/"show spu " commands. */
static void
-show_spu_command (char *args, int from_tty)
+show_spu_command (const char *args, int from_tty)
{
help_list (showspucmdlist, "show spu ", all_commands, gdb_stdout);
}
static void
-set_spu_command (char *args, int from_tty)
+set_spu_command (const char *args, int from_tty)
{
help_list (setspucmdlist, "set spu ", all_commands, gdb_stdout);
}
static void overlay_invalidate_all (void);
-static void overlay_command (char *, int);
-
static void simple_free_overlay_table (void);
static void read_target_long_array (CORE_ADDR, unsigned int *, int, int,
static struct cmd_list_element *overlaylist;
static void
-overlay_command (char *args, int from_tty)
+overlay_command (const char *args, int from_tty)
{
printf_unfiltered
("\"overlay\" must be followed by the name of an overlay command.\n");
/* Helper functions for the CLI commands. */
static void
-set_tdesc_cmd (char *args, int from_tty)
+set_tdesc_cmd (const char *args, int from_tty)
{
help_list (tdesc_set_cmdlist, "set tdesc ", all_commands, gdb_stdout);
}
static void
-show_tdesc_cmd (char *args, int from_tty)
+show_tdesc_cmd (const char *args, int from_tty)
{
cmd_show_list (tdesc_show_cmdlist, from_tty, "");
}
static void
-unset_tdesc_cmd (char *args, int from_tty)
+unset_tdesc_cmd (const char *args, int from_tty)
{
help_list (tdesc_unset_cmdlist, "unset tdesc ", all_commands, gdb_stdout);
}
static int return_zero_has_execution (struct target_ops *, ptid_t);
-static void target_command (char *, int);
-
static struct target_ops *find_default_run_target (const char *);
static struct gdbarch *default_thread_architecture (struct target_ops *ops,
/* The user just typed 'target' without the name of a target. */
static void
-target_command (char *arg, int from_tty)
+target_command (const char *arg, int from_tty)
{
fputs_filtered ("Argument required (target name). Try `help target'\n",
gdb_stdout);
static void thread_apply_all_command (char *, int);
static int thread_alive (struct thread_info *);
static void info_threads_command (char *, int);
-static void thread_apply_command (char *, int);
/* RAII type used to increase / decrease the refcount of each thread
in a given list of threads. */
/* Implementation of the "thread apply" command. */
static void
-thread_apply_command (char *tidlist, int from_tty)
+thread_apply_command (const char *tidlist, int from_tty)
{
char *cmd = NULL;
tid_range_parser parser;
if prefix of arg is `apply'. */
void
-thread_command (char *tidstr, int from_tty)
+thread_command (const char *tidstr, int from_tty)
{
if (tidstr == NULL)
{
}
void
-set_history (char *args, int from_tty)
+set_history (const char *args, int from_tty)
{
printf_unfiltered (_("\"set history\" must be followed "
"by the name of a history subcommand.\n"));
}
void
-show_history (char *args, int from_tty)
+show_history (const char *args, int from_tty)
{
cmd_show_list (showhistlist, from_tty, "");
}
extern void show_commands (char *args, int from_tty);
-extern void set_history (char *, int);
+extern void set_history (const char *, int);
-extern void show_history (char *, int);
+extern void show_history (const char *, int);
extern void set_verbose (char *, int, struct cmd_list_element *);
}
static void
-tfind_command (char *args, int from_tty)
+tfind_command (const char *args, int from_tty)
{
tfind_command_1 (const_cast<char *> (args), from_tty);
}
}
static void
-set_tui_cmd (char *args, int from_tty)
+set_tui_cmd (const char *args, int from_tty)
{
}
static void
-show_tui_cmd (char *args, int from_tty)
+show_tui_cmd (const char *args, int from_tty)
{
}
static struct cmd_list_element *tuilist;
static void
-tui_command (char *args, int from_tty)
+tui_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"tui\" must be followed by the name of a "
"tui command.\n"));
struct cmd_list_element *showprinttypelist;
static void
-set_print_type (char *arg, int from_tty)
+set_print_type (const char *arg, int from_tty)
{
printf_unfiltered (
"\"set print type\" must be followed by the name of a subcommand.\n");
}
static void
-show_print_type (char *args, int from_tty)
+show_print_type (const char *args, int from_tty)
{
cmd_show_list (showprinttypelist, from_tty, "");
}
/* Dummy functions to keep add_prefix_cmd happy. */
static void
-set_internal_problem_cmd (char *args, int from_tty)
+set_internal_problem_cmd (const char *args, int from_tty)
{
}
static void
-show_internal_problem_cmd (char *args, int from_tty)
+show_internal_problem_cmd (const char *args, int from_tty)
{
}
show_doc = xstrprintf (_("Show what GDB does when %s is detected."),
problem->name);
- add_prefix_cmd ((char*) problem->name,
+ add_prefix_cmd (problem->name,
class_maintenance, set_internal_problem_cmd, set_doc,
set_cmd_list,
concat ("maintenance set ", problem->name, " ",
(char *) NULL),
0/*allow-unknown*/, &maintenance_set_cmdlist);
- add_prefix_cmd ((char*) problem->name,
+ add_prefix_cmd (problem->name,
class_maintenance, show_internal_problem_cmd, show_doc,
show_cmd_list,
concat ("maintenance show ", problem->name, " ",
static int partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr,
int len, int *errptr);
-static void show_print (char *, int);
-
-static void set_print (char *, int);
-
static void set_input_radix (char *, int, struct cmd_list_element *);
static void set_input_radix_1 (int, unsigned);
\f
static void
-set_print (char *arg, int from_tty)
+set_print (const char *arg, int from_tty)
{
printf_unfiltered (
"\"set print\" must be followed by the name of a print subcommand.\n");
}
static void
-show_print (char *args, int from_tty)
+show_print (const char *args, int from_tty)
{
cmd_show_list (showprintlist, from_tty, "");
}
static void
-set_print_raw (char *arg, int from_tty)
+set_print_raw (const char *arg, int from_tty)
{
printf_unfiltered (
"\"set print raw\" must be followed by the name of a \"print raw\" subcommand.\n");
}
static void
-show_print_raw (char *args, int from_tty)
+show_print_raw (const char *args, int from_tty)
{
cmd_show_list (showprintrawlist, from_tty, "");
}
the implementation of the sub-command that is created when
registering an internal function. */
static void
-function_command (char *command, int from_tty)
+function_command (const char *command, int from_tty)
{
/* Do nothing. */
}
}
static void
-info_w32_command (char *args, int from_tty)
+info_w32_command (const char *args, int from_tty)
{
help_list (info_w32_cmdlist, "info w32 ", class_info, gdb_stdout);
}