diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 0696edb740..f871edd5db 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13003,7 +13003,7 @@ create_ada_exception_catchpoint (struct gdbarch *gdbarch,
 /* Implement the "catch exception" command.  */
 
 static void
-catch_ada_exception_command (char *arg_entry, int from_tty,
+catch_ada_exception_command (const char *arg_entry, int from_tty,
 			     struct cmd_list_element *command)
 {
   const char *arg = arg_entry;
@@ -13058,7 +13058,7 @@ catch_ada_assert_command_split (const char *args, char **cond_string)
 /* Implement the "catch assert" command.  */
 
 static void
-catch_assert_command (char *arg_entry, int from_tty,
+catch_assert_command (const char *arg_entry, int from_tty,
 		      struct cmd_list_element *command)
 {
   const char *arg = arg_entry;
diff --git a/gdb/agent.c b/gdb/agent.c
index c0f10aa702..f04845e998 100644
--- a/gdb/agent.c
+++ b/gdb/agent.c
@@ -44,7 +44,7 @@ show_can_use_agent (struct ui_file *file, int from_tty,
 }
 
 static void
-set_can_use_agent (char *args, int from_tty, struct cmd_list_element *c)
+set_can_use_agent (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (target_use_agent (can_use_agent == can_use_agent_on) == 0)
     /* Something wrong during setting, set flag to default value.  */
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 89556956ab..2e520bcb41 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1461,7 +1461,8 @@ static const struct frame_base alpha_heuristic_frame_base = {
    callable as an sfunc.  Used by the "set heuristic-fence-post" command.  */
 
 static void
-reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
+reinit_frame_cache_sfunc (const char *args,
+			  int from_tty, struct cmd_list_element *c)
 {
   reinit_frame_cache ();
 }
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 6bdcc0126d..39de36909a 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -332,7 +332,7 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
 }
 
 static void
-set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
+set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c)
 {
   struct gdbarch_info info;
 
@@ -490,7 +490,8 @@ show_architecture (struct ui_file *file, int from_tty,
    argument.  */
 
 static void
-set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
+set_architecture (const char *ignore_args,
+		  int from_tty, struct cmd_list_element *c)
 {
   struct gdbarch_info info;
 
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 960696df93..c633cb3734 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -220,7 +220,7 @@ static const char *disassembly_style;
 
 /* This is used to keep the bfd arch_info in sync with the disassembly
    style.  */
-static void set_disassembly_style_sfunc(char *, int,
+static void set_disassembly_style_sfunc (const char *, int,
 					 struct cmd_list_element *);
 static void show_disassembly_style_sfunc (struct ui_file *, int,
 					  struct cmd_list_element *,
@@ -8384,7 +8384,7 @@ arm_update_current_architecture (void)
 }
 
 static void
-set_fp_model_sfunc (char *args, int from_tty,
+set_fp_model_sfunc (const char *args, int from_tty,
 		    struct cmd_list_element *c)
 {
   int fp_model;
@@ -8421,7 +8421,7 @@ The current ARM floating point model is \"%s\".\n"),
 }
 
 static void
-arm_set_abi (char *args, int from_tty,
+arm_set_abi (const char *args, int from_tty,
 	     struct cmd_list_element *c)
 {
   int arm_abi;
@@ -8482,7 +8482,7 @@ arm_show_force_mode (struct ui_file *file, int from_tty,
    arm disassembly" command, and does that.  */
 
 static void
-set_disassembly_style_sfunc (char *args, int from_tty,
+set_disassembly_style_sfunc (const char *args, int from_tty,
 			     struct cmd_list_element *c)
 {
   /* Convert the short style name into the long style name (eg, reg-names-*)
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 6ef05fd913..6d5c9a3b37 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -139,7 +139,7 @@ static char *auto_load_dir;
 /* "set" command for the auto_load_dir configuration variable.  */
 
 static void
-set_auto_load_dir (char *args, int from_tty, struct cmd_list_element *c)
+set_auto_load_dir (const char *args, int from_tty, struct cmd_list_element *c)
 {
   /* Setting the variable to "" resets it to the compile time defaults.  */
   if (auto_load_dir[0] == '\0')
@@ -262,7 +262,8 @@ auto_load_gdb_datadir_changed (void)
 /* "set" command for the auto_load_safe_path configuration variable.  */
 
 static void
-set_auto_load_safe_path (char *args, int from_tty, struct cmd_list_element *c)
+set_auto_load_safe_path (const char *args,
+			 int from_tty, struct cmd_list_element *c)
 {
   /* Setting the variable to "" resets it to the compile time defaults.  */
   if (auto_load_safe_path[0] == '\0')
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c
index 5bc3aed09d..6100d1ee62 100644
--- a/gdb/break-catch-sig.c
+++ b/gdb/break-catch-sig.c
@@ -332,7 +332,7 @@ create_signal_catchpoint (int tempflag, std::vector<gdb_signal> &&filter,
    list, which is empty if no filtering is required.  */
 
 static std::vector<gdb_signal>
-catch_signal_split_args (char *arg, bool *catch_all)
+catch_signal_split_args (const char *arg, bool *catch_all)
 {
   std::vector<gdb_signal> result;
   bool first = true;
@@ -381,7 +381,7 @@ catch_signal_split_args (char *arg, bool *catch_all)
 /* Implement the "catch signal" command.  */
 
 static void
-catch_signal_command (char *arg, int from_tty,
+catch_signal_command (const char *arg, int from_tty,
 		      struct cmd_list_element *command)
 {
   int tempflag;
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index 01e761ce37..be5933dbe2 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -382,7 +382,7 @@ create_syscall_event_catchpoint (int tempflag, std::vector<int> &&filter,
 /* Splits the argument using space as delimiter.  */
 
 static std::vector<int>
-catch_syscall_split_args (char *arg)
+catch_syscall_split_args (const char *arg)
 {
   std::vector<int> result;
   struct gdbarch *gdbarch = target_gdbarch ();
@@ -457,7 +457,7 @@ catch_syscall_split_args (char *arg)
 /* Implement the "catch syscall" command.  */
 
 static void
-catch_syscall_command_1 (char *arg, int from_tty, 
+catch_syscall_command_1 (const char *arg, int from_tty, 
 			 struct cmd_list_element *command)
 {
   int tempflag;
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index faa878e931..fd8a113803 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -430,11 +430,10 @@ extract_exception_regexp (const char **string)
 
 static void
 catch_exception_command_1 (enum exception_event_kind ex_event,
-			   char *arg_entry,
+			   const char *arg,
 			   int tempflag, int from_tty)
 {
   const char *cond_string = NULL;
-  const char *arg = arg_entry;
 
   if (!arg)
     arg = "";
@@ -459,7 +458,8 @@ catch_exception_command_1 (enum exception_event_kind ex_event,
 /* Implementation of "catch catch" command.  */
 
 static void
-catch_catch_command (char *arg, int from_tty, struct cmd_list_element *command)
+catch_catch_command (const char *arg, int from_tty,
+		     struct cmd_list_element *command)
 {
   int tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
 
@@ -469,7 +469,8 @@ catch_catch_command (char *arg, int from_tty, struct cmd_list_element *command)
 /* Implementation of "catch throw" command.  */
 
 static void
-catch_throw_command (char *arg, int from_tty, struct cmd_list_element *command)
+catch_throw_command (const char *arg, int from_tty,
+		     struct cmd_list_element *command)
 {
   int tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
 
@@ -479,7 +480,7 @@ catch_throw_command (char *arg, int from_tty, struct cmd_list_element *command)
 /* Implementation of "catch rethrow" command.  */
 
 static void
-catch_rethrow_command (char *arg, int from_tty,
+catch_rethrow_command (const char *arg, int from_tty,
 		       struct cmd_list_element *command)
 {
   int tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index fc78f8ed81..16a34fb07a 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -712,7 +712,7 @@ mark_breakpoint_location_modified (struct bp_location *loc)
    condition_evaluation_mode.  */
 
 static void
-set_condition_evaluation_mode (char *args, int from_tty,
+set_condition_evaluation_mode (const char *args, int from_tty,
 			       struct cmd_list_element *c)
 {
   const char *old_mode, *new_mode;
@@ -8241,7 +8241,7 @@ add_solib_catchpoint (const char *arg, int is_load, int is_temp, int enabled)
    "catch unload".  */
 
 static void
-catch_load_or_unload (char *arg, int from_tty, int is_load,
+catch_load_or_unload (const char *arg, int from_tty, int is_load,
 		      struct cmd_list_element *command)
 {
   int tempflag;
@@ -8253,14 +8253,14 @@ catch_load_or_unload (char *arg, int from_tty, int is_load,
 }
 
 static void
-catch_load_command_1 (char *arg, int from_tty,
+catch_load_command_1 (const char *arg, int from_tty,
 		      struct cmd_list_element *command)
 {
   catch_load_or_unload (arg, from_tty, 1, command);
 }
 
 static void
-catch_unload_command_1 (char *arg, int from_tty,
+catch_unload_command_1 (const char *arg, int from_tty,
 			struct cmd_list_element *command)
 {
   catch_load_or_unload (arg, from_tty, 0, command);
@@ -8867,7 +8867,7 @@ update_dprintf_command_list (struct breakpoint *b)
    current style settings.  */
 
 static void
-update_dprintf_commands (char *args, int from_tty,
+update_dprintf_commands (const char *args, int from_tty,
 			 struct cmd_list_element *c)
 {
   struct breakpoint *b;
@@ -11344,10 +11344,9 @@ typedef enum
 catch_fork_kind;
 
 static void
-catch_fork_command_1 (char *arg_entry, int from_tty,
+catch_fork_command_1 (const char *arg, int from_tty,
 		      struct cmd_list_element *command)
 {
-  const char *arg = arg_entry;
   struct gdbarch *gdbarch = get_current_arch ();
   const char *cond_string = NULL;
   catch_fork_kind fork_kind;
@@ -11392,10 +11391,9 @@ catch_fork_command_1 (char *arg_entry, int from_tty,
 }
 
 static void
-catch_exec_command_1 (char *arg_entry, int from_tty,
+catch_exec_command_1 (const char *arg, int from_tty,
 		      struct cmd_list_element *command)
 {
-  const char *arg = arg_entry;
   struct gdbarch *gdbarch = get_current_arch ();
   int tempflag;
   const char *cond_string = NULL;
@@ -15224,7 +15222,7 @@ static struct cmd_list_element *tcatch_cmdlist;
 
 void
 add_catch_command (const char *name, const char *docstring,
-		   cmd_sfunc_ftype *sfunc,
+		   cmd_const_sfunc_ftype *sfunc,
 		   completer_ftype *completer,
 		   void *user_data_catch,
 		   void *user_data_tcatch)
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index c75d5b5b1b..f256392663 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1277,7 +1277,7 @@ extern void initialize_breakpoint_ops (void);
 
 extern void
   add_catch_command (const char *name, const char *docstring,
-		     cmd_sfunc_ftype *sfunc,
+		     cmd_const_sfunc_ftype *sfunc,
 		     completer_ftype *completer,
 		     void *user_data_catch,
 		     void *user_data_tcatch);
diff --git a/gdb/charset.c b/gdb/charset.c
index cc74331058..709a314914 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -365,7 +365,7 @@ validate (struct gdbarch *gdbarch)
 
 /* This is the sfunc for the 'set charset' command.  */
 static void
-set_charset_sfunc (char *charset, int from_tty, 
+set_charset_sfunc (const char *charset, int from_tty, 
 		   struct cmd_list_element *c)
 {
   /* CAREFUL: set the target charset here as well.  */
@@ -376,7 +376,7 @@ set_charset_sfunc (char *charset, int from_tty,
 /* 'set host-charset' command sfunc.  We need a wrapper here because
    the function needs to have a specific signature.  */
 static void
-set_host_charset_sfunc (char *charset, int from_tty,
+set_host_charset_sfunc (const char *charset, int from_tty,
 			struct cmd_list_element *c)
 {
   validate (get_current_arch ());
@@ -384,7 +384,7 @@ set_host_charset_sfunc (char *charset, int from_tty,
 
 /* Wrapper for the 'set target-charset' command.  */
 static void
-set_target_charset_sfunc (char *charset, int from_tty,
+set_target_charset_sfunc (const char *charset, int from_tty,
 			  struct cmd_list_element *c)
 {
   validate (get_current_arch ());
@@ -392,7 +392,7 @@ set_target_charset_sfunc (char *charset, int from_tty,
 
 /* Wrapper for the 'set target-wide-charset' command.  */
 static void
-set_target_wide_charset_sfunc (char *charset, int from_tty,
+set_target_wide_charset_sfunc (const char *charset, int from_tty,
 			       struct cmd_list_element *c)
 {
   validate (get_current_arch ());
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 459438e170..c3e72283c5 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -123,7 +123,7 @@ do_sfunc (struct cmd_list_element *c, char *args, int from_tty)
 }
 
 void
-set_cmd_sfunc (struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
+set_cmd_sfunc (struct cmd_list_element *cmd, cmd_const_sfunc_ftype *sfunc)
 {
   if (sfunc == NULL)
     cmd->func = NULL;
@@ -414,10 +414,9 @@ not_just_help_class_command (const char *args, int from_tty)
 }
 
 /* This is an empty "sfunc".  */
-static void empty_sfunc (char *, int, struct cmd_list_element *);
 
 static void
-empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
+empty_sfunc (const char *args, int from_tty, struct cmd_list_element *c)
 {
 }
 
@@ -465,7 +464,7 @@ add_setshow_cmd_full (const char *name,
 		      var_types var_type, void *var,
 		      const char *set_doc, const char *show_doc,
 		      const char *help_doc,
-		      cmd_sfunc_ftype *set_func,
+		      cmd_const_sfunc_ftype *set_func,
 		      show_value_ftype *show_func,
 		      struct cmd_list_element **set_list,
 		      struct cmd_list_element **show_list,
@@ -520,7 +519,7 @@ add_setshow_enum_cmd (const char *name,
 		      const char *set_doc,
 		      const char *show_doc,
 		      const char *help_doc,
-		      cmd_sfunc_ftype *set_func,
+		      cmd_const_sfunc_ftype *set_func,
 		      show_value_ftype *show_func,
 		      struct cmd_list_element **set_list,
 		      struct cmd_list_element **show_list)
@@ -547,7 +546,7 @@ add_setshow_auto_boolean_cmd (const char *name,
 			      enum auto_boolean *var,
 			      const char *set_doc, const char *show_doc,
 			      const char *help_doc,
-			      cmd_sfunc_ftype *set_func,
+			      cmd_const_sfunc_ftype *set_func,
 			      show_value_ftype *show_func,
 			      struct cmd_list_element **set_list,
 			      struct cmd_list_element **show_list)
@@ -570,7 +569,7 @@ void
 add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
 			 const char *set_doc, const char *show_doc,
 			 const char *help_doc,
-			 cmd_sfunc_ftype *set_func,
+			 cmd_const_sfunc_ftype *set_func,
 			 show_value_ftype *show_func,
 			 struct cmd_list_element **set_list,
 			 struct cmd_list_element **show_list)
@@ -593,7 +592,7 @@ add_setshow_filename_cmd (const char *name, enum command_class theclass,
 			  char **var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
-			  cmd_sfunc_ftype *set_func,
+			  cmd_const_sfunc_ftype *set_func,
 			  show_value_ftype *show_func,
 			  struct cmd_list_element **set_list,
 			  struct cmd_list_element **show_list)
@@ -615,7 +614,7 @@ add_setshow_string_cmd (const char *name, enum command_class theclass,
 			char **var,
 			const char *set_doc, const char *show_doc,
 			const char *help_doc,
-			cmd_sfunc_ftype *set_func,
+			cmd_const_sfunc_ftype *set_func,
 			show_value_ftype *show_func,
 			struct cmd_list_element **set_list,
 			struct cmd_list_element **show_list)
@@ -634,7 +633,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class theclass,
 				 char **var,
 				 const char *set_doc, const char *show_doc,
 				 const char *help_doc,
-				 cmd_sfunc_ftype *set_func,
+				 cmd_const_sfunc_ftype *set_func,
 				 show_value_ftype *show_func,
 				 struct cmd_list_element **set_list,
 				 struct cmd_list_element **show_list)
@@ -656,7 +655,7 @@ add_setshow_optional_filename_cmd (const char *name, enum command_class theclass
 				   char **var,
 				   const char *set_doc, const char *show_doc,
 				   const char *help_doc,
-				   cmd_sfunc_ftype *set_func,
+				   cmd_const_sfunc_ftype *set_func,
 				   show_value_ftype *show_func,
 				   struct cmd_list_element **set_list,
 				   struct cmd_list_element **show_list)
@@ -700,7 +699,7 @@ add_setshow_integer_cmd (const char *name, enum command_class theclass,
 			 int *var,
 			 const char *set_doc, const char *show_doc,
 			 const char *help_doc,
-			 cmd_sfunc_ftype *set_func,
+			 cmd_const_sfunc_ftype *set_func,
 			 show_value_ftype *show_func,
 			 struct cmd_list_element **set_list,
 			 struct cmd_list_element **show_list)
@@ -725,7 +724,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
 			  unsigned int *var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
-			  cmd_sfunc_ftype *set_func,
+			  cmd_const_sfunc_ftype *set_func,
 			  show_value_ftype *show_func,
 			  struct cmd_list_element **set_list,
 			  struct cmd_list_element **show_list)
@@ -750,7 +749,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class theclass,
 			  int *var,
 			  const char *set_doc, const char *show_doc,
 			  const char *help_doc,
-			  cmd_sfunc_ftype *set_func,
+			  cmd_const_sfunc_ftype *set_func,
 			  show_value_ftype *show_func,
 			  struct cmd_list_element **set_list,
 			  struct cmd_list_element **show_list)
@@ -769,7 +768,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
 				     const char *set_doc,
 				     const char *show_doc,
 				     const char *help_doc,
-				     cmd_sfunc_ftype *set_func,
+				     cmd_const_sfunc_ftype *set_func,
 				     show_value_ftype *show_func,
 				     struct cmd_list_element **set_list,
 				     struct cmd_list_element **show_list)
@@ -794,7 +793,7 @@ add_setshow_zuinteger_cmd (const char *name, enum command_class theclass,
 			   unsigned int *var,
 			   const char *set_doc, const char *show_doc,
 			   const char *help_doc,
-			   cmd_sfunc_ftype *set_func,
+			   cmd_const_sfunc_ftype *set_func,
 			   show_value_ftype *show_func,
 			   struct cmd_list_element **set_list,
 			   struct cmd_list_element **show_list)
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index e3ac69ba66..9b2d598ff5 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -116,7 +116,7 @@ struct cmd_list_element
 	cmd_const_cfunc_ftype *const_cfunc;
 	/* If type is set_cmd or show_cmd, first set the variables,
 	   and then call this: */
-	cmd_sfunc_ftype *sfunc;
+	cmd_const_sfunc_ftype *sfunc;
       }
     function;
 
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index ee31659389..8e86ce7295 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -44,7 +44,8 @@ maybe_warn_already_logging ()
 }
 
 static void
-set_logging_overwrite (char *args, int from_tty, struct cmd_list_element *c)
+set_logging_overwrite (const char *args,
+		       int from_tty, struct cmd_list_element *c)
 {
   maybe_warn_already_logging ();
 }
@@ -63,7 +64,8 @@ show_logging_overwrite (struct ui_file *file, int from_tty,
 static int logging_redirect;
 
 static void
-set_logging_redirect (char *args, int from_tty, struct cmd_list_element *c)
+set_logging_redirect (const char *args,
+		      int from_tty, struct cmd_list_element *c)
 {
   maybe_warn_already_logging ();
 }
diff --git a/gdb/command.h b/gdb/command.h
index cbcf523cc9..69e903fd1c 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -174,10 +174,10 @@ extern struct cmd_list_element *add_abbrev_prefix_cmd (const char *,
 						       struct cmd_list_element
 						       **);
 
-typedef void cmd_sfunc_ftype (char *args, int from_tty,
-			      struct cmd_list_element *c);
+typedef void cmd_const_sfunc_ftype (const char *args, int from_tty,
+				    struct cmd_list_element *c);
 extern void set_cmd_sfunc (struct cmd_list_element *cmd,
-			   cmd_sfunc_ftype *sfunc);
+			   cmd_const_sfunc_ftype *sfunc);
 
 /* A completion routine.  Add possible completions to tracker.
 
@@ -297,7 +297,7 @@ extern void add_setshow_enum_cmd (const char *name,
 				  const char *set_doc,
 				  const char *show_doc,
 				  const char *help_doc,
-				  cmd_sfunc_ftype *set_func,
+				  cmd_const_sfunc_ftype *set_func,
 				  show_value_ftype *show_func,
 				  struct cmd_list_element **set_list,
 				  struct cmd_list_element **show_list);
@@ -308,7 +308,7 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
 					  const char *set_doc,
 					  const char *show_doc,
 					  const char *help_doc,
-					  cmd_sfunc_ftype *set_func,
+					  cmd_const_sfunc_ftype *set_func,
 					  show_value_ftype *show_func,
 					  struct cmd_list_element **set_list,
 					  struct cmd_list_element **show_list);
@@ -318,7 +318,7 @@ extern void add_setshow_boolean_cmd (const char *name,
 				     int *var,
 				     const char *set_doc, const char *show_doc,
 				     const char *help_doc,
-				     cmd_sfunc_ftype *set_func,
+				     cmd_const_sfunc_ftype *set_func,
 				     show_value_ftype *show_func,
 				     struct cmd_list_element **set_list,
 				     struct cmd_list_element **show_list);
@@ -329,7 +329,7 @@ extern void add_setshow_filename_cmd (const char *name,
 				      const char *set_doc,
 				      const char *show_doc,
 				      const char *help_doc,
-				      cmd_sfunc_ftype *set_func,
+				      cmd_const_sfunc_ftype *set_func,
 				      show_value_ftype *show_func,
 				      struct cmd_list_element **set_list,
 				      struct cmd_list_element **show_list);
@@ -340,7 +340,7 @@ extern void add_setshow_string_cmd (const char *name,
 				    const char *set_doc,
 				    const char *show_doc,
 				    const char *help_doc,
-				    cmd_sfunc_ftype *set_func,
+				    cmd_const_sfunc_ftype *set_func,
 				    show_value_ftype *show_func,
 				    struct cmd_list_element **set_list,
 				    struct cmd_list_element **show_list);
@@ -352,7 +352,7 @@ extern struct cmd_list_element *add_setshow_string_noescape_cmd
 		       const char *set_doc,
 		       const char *show_doc,
 		       const char *help_doc,
-		       cmd_sfunc_ftype *set_func,
+		       cmd_const_sfunc_ftype *set_func,
 		       show_value_ftype *show_func,
 		       struct cmd_list_element **set_list,
 		       struct cmd_list_element **show_list);
@@ -363,7 +363,7 @@ extern void add_setshow_optional_filename_cmd (const char *name,
 					       const char *set_doc,
 					       const char *show_doc,
 					       const char *help_doc,
-					       cmd_sfunc_ftype *set_func,
+					       cmd_const_sfunc_ftype *set_func,
 					       show_value_ftype *show_func,
 					       struct cmd_list_element **set_list,
 					       struct cmd_list_element **show_list);
@@ -374,7 +374,7 @@ extern void add_setshow_integer_cmd (const char *name,
 				     const char *set_doc,
 				     const char *show_doc,
 				     const char *help_doc,
-				     cmd_sfunc_ftype *set_func,
+				     cmd_const_sfunc_ftype *set_func,
 				     show_value_ftype *show_func,
 				     struct cmd_list_element **set_list,
 				     struct cmd_list_element **show_list);
@@ -385,7 +385,7 @@ extern void add_setshow_uinteger_cmd (const char *name,
 				      const char *set_doc,
 				      const char *show_doc,
 				      const char *help_doc,
-				      cmd_sfunc_ftype *set_func,
+				      cmd_const_sfunc_ftype *set_func,
 				      show_value_ftype *show_func,
 				      struct cmd_list_element **set_list,
 				      struct cmd_list_element **show_list);
@@ -396,7 +396,7 @@ extern void add_setshow_zinteger_cmd (const char *name,
 				      const char *set_doc,
 				      const char *show_doc,
 				      const char *help_doc,
-				      cmd_sfunc_ftype *set_func,
+				      cmd_const_sfunc_ftype *set_func,
 				      show_value_ftype *show_func,
 				      struct cmd_list_element **set_list,
 				      struct cmd_list_element **show_list);
@@ -407,7 +407,7 @@ extern void add_setshow_zuinteger_cmd (const char *name,
 				       const char *set_doc,
 				       const char *show_doc,
 				       const char *help_doc,
-				       cmd_sfunc_ftype *set_func,
+				       cmd_const_sfunc_ftype *set_func,
 				       show_value_ftype *show_func,
 				       struct cmd_list_element **set_list,
 				       struct cmd_list_element **show_list);
@@ -419,7 +419,7 @@ extern void
 				       const char *set_doc,
 				       const char *show_doc,
 				       const char *help_doc,
-				       cmd_sfunc_ftype *set_func,
+				       cmd_const_sfunc_ftype *set_func,
 				       show_value_ftype *show_func,
 				       struct cmd_list_element **set_list,
 				       struct cmd_list_element **show_list);
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index cd8ce6a1c1..9de244a6ee 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -302,7 +302,7 @@ static char **compile_args_argv;
 /* Implement 'set compile-args'.  */
 
 static void
-set_compile_args (char *args, int from_tty, struct cmd_list_element *c)
+set_compile_args (const char *args, int from_tty, struct cmd_list_element *c)
 {
   freeargv (compile_args_argv);
   build_argc_argv (compile_args, &compile_args_argc, &compile_args_argv);
diff --git a/gdb/corefile.c b/gdb/corefile.c
index b9d95c07db..686603aaa8 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -452,11 +452,8 @@ show_gnutarget_string (struct ui_file *file, int from_tty,
 		    _("The current BFD target is \"%s\".\n"), value);
 }
 
-static void set_gnutarget_command (char *, int,
-				   struct cmd_list_element *);
-
 static void
-set_gnutarget_command (char *ignore, int from_tty,
+set_gnutarget_command (const char *ignore, int from_tty,
 		       struct cmd_list_element *c)
 {
   char *gend = gnutarget_string + strlen (gnutarget_string);
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index d64c99ac81..94dd227241 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -634,13 +634,13 @@ static struct gdbarch *cris_gdbarch_init (struct gdbarch_info,
 
 static void cris_dump_tdep (struct gdbarch *, struct ui_file *);
 
-static void set_cris_version (char *ignore_args, int from_tty, 
+static void set_cris_version (const char *ignore_args, int from_tty, 
 			      struct cmd_list_element *c);
 
-static void set_cris_mode (char *ignore_args, int from_tty, 
+static void set_cris_mode (const char *ignore_args, int from_tty, 
 			   struct cmd_list_element *c);
 
-static void set_cris_dwarf2_cfi (char *ignore_args, int from_tty, 
+static void set_cris_dwarf2_cfi (const char *ignore_args, int from_tty, 
 				 struct cmd_list_element *c);
 
 static CORE_ADDR cris_scan_prologue (CORE_ADDR pc, 
@@ -3926,7 +3926,7 @@ cris_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
 }
 
 static void
-set_cris_version (char *ignore_args, int from_tty, 
+set_cris_version (const char *ignore_args, int from_tty, 
 		  struct cmd_list_element *c)
 {
   struct gdbarch_info info;
@@ -3941,7 +3941,7 @@ set_cris_version (char *ignore_args, int from_tty,
 }
 
 static void
-set_cris_mode (char *ignore_args, int from_tty, 
+set_cris_mode (const char *ignore_args, int from_tty, 
 	       struct cmd_list_element *c)
 {
   struct gdbarch_info info;
@@ -3954,7 +3954,7 @@ set_cris_mode (char *ignore_args, int from_tty,
 }
 
 static void
-set_cris_dwarf2_cfi (char *ignore_args, int from_tty, 
+set_cris_dwarf2_cfi (const char *ignore_args, int from_tty, 
 		     struct cmd_list_element *c)
 {
   struct gdbarch_info info;
diff --git a/gdb/dcache.c b/gdb/dcache.c
index e7b1e1440e..740438fe11 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -644,7 +644,7 @@ info_dcache_command (const char *exp, int tty)
 }
 
 static void
-set_dcache_size (char *args, int from_tty,
+set_dcache_size (const char *args, int from_tty,
 		 struct cmd_list_element *c)
 {
   if (dcache_size == 0)
@@ -656,7 +656,7 @@ set_dcache_size (char *args, int from_tty,
 }
 
 static void
-set_dcache_line_size (char *args, int from_tty,
+set_dcache_line_size (const char *args, int from_tty,
 		      struct cmd_list_element *c)
 {
   if (dcache_line_size < 2
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 1a97fb7f28..696f2141fc 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -104,7 +104,8 @@ show_demangling_style_names(struct ui_file *file, int from_tty,
    a malloc'd string, even if it is a null-string.  */
 
 static void
-set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
+set_demangling_command (const char *ignore,
+			int from_tty, struct cmd_list_element *c)
 {
   const struct demangler_engine *dem;
   int i;
diff --git a/gdb/disasm.c b/gdb/disasm.c
index cdab181484..7f37b9b077 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -962,7 +962,7 @@ set_disassembler_options (char *prospective_options)
 }
 
 static void
-set_disassembler_options_sfunc (char *args, int from_tty,
+set_disassembler_options_sfunc (const char *args, int from_tty,
 				struct cmd_list_element *c)
 {
   set_disassembler_options (prospective_options);
diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c
index ab00fd93e5..94787787f1 100644
--- a/gdb/guile/scm-param.c
+++ b/gdb/guile/scm-param.c
@@ -269,7 +269,7 @@ pascm_signal_setshow_error (SCM exception, const char *msg)
    Note: ARGS is always passed as NULL.  */
 
 static void
-pascm_set_func (char *args, int from_tty, struct cmd_list_element *c)
+pascm_set_func (const char *args, int from_tty, struct cmd_list_element *c)
 {
   param_smob *p_smob = (param_smob *) get_cmd_context (c);
   SCM self, result, exception;
@@ -357,7 +357,7 @@ static void
 add_setshow_generic (enum var_types param_type, enum command_class cmd_class,
 		     char *cmd_name, param_smob *self,
 		     char *set_doc, char *show_doc, char *help_doc,
-		     cmd_sfunc_ftype *set_func,
+		     cmd_const_sfunc_ftype *set_func,
 		     show_value_ftype *show_func,
 		     struct cmd_list_element **set_list,
 		     struct cmd_list_element **show_list,
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 7b6ac9e84e..005074daf1 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -134,7 +134,7 @@ get_inferior_io_terminal (void)
 }
 
 static void
-set_inferior_tty_command (char *args, int from_tty,
+set_inferior_tty_command (const char *args, int from_tty,
 			  struct cmd_list_element *c)
 {
   /* CLI has assigned the user-provided value to inferior_io_terminal_scratch.
@@ -198,7 +198,7 @@ set_inferior_args_vector (int argc, char **argv)
 /* Notice when `set args' is run.  */
 
 static void
-set_args_command (char *args, int from_tty, struct cmd_list_element *c)
+set_args_command (const char *args, int from_tty, struct cmd_list_element *c)
 {
   /* CLI has assigned the user-provided value to inferior_args_scratch.
      Now route it to current inferior.  */
@@ -242,7 +242,7 @@ get_inferior_cwd ()
 /* Handle the 'set cwd' command.  */
 
 static void
-set_cwd_command (char *args, int from_tty, struct cmd_list_element *c)
+set_cwd_command (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (*inferior_cwd_scratch == '\0')
     set_inferior_cwd (NULL);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index e5e938d19d..514d1c1fea 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -82,9 +82,6 @@ static int follow_fork_inferior (int follow_child, int detach_fork);
 
 static void follow_inferior_reset_breakpoints (void);
 
-static void set_schedlock_func (char *args, int from_tty,
-				struct cmd_list_element *c);
-
 static int currently_stepping (struct thread_info *tp);
 
 void nullify_last_target_wait_ptid (void);
@@ -195,7 +192,7 @@ show_disable_randomization (struct ui_file *file, int from_tty,
 }
 
 static void
-set_disable_randomization (char *args, int from_tty,
+set_disable_randomization (const char *args, int from_tty,
 			   struct cmd_list_element *c)
 {
   if (!target_supports_disable_randomization ())
@@ -210,7 +207,7 @@ int non_stop = 0;
 static int non_stop_1 = 0;
 
 static void
-set_non_stop (char *args, int from_tty,
+set_non_stop (const char *args, int from_tty,
 	      struct cmd_list_element *c)
 {
   if (target_has_execution)
@@ -239,7 +236,7 @@ int observer_mode = 0;
 static int observer_mode_1 = 0;
 
 static void
-set_observer_mode (char *args, int from_tty,
+set_observer_mode (const char *args, int from_tty,
 		   struct cmd_list_element *c)
 {
   if (target_has_execution)
@@ -364,7 +361,8 @@ int stop_on_solib_events;
    as appropriate when the above flag is changed.  */
 
 static void
-set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c)
+set_stop_on_solib_events (const char *args,
+			  int from_tty, struct cmd_list_element *c)
 {
   update_solib_breakpoints ();
 }
@@ -2227,7 +2225,7 @@ show_scheduler_mode (struct ui_file *file, int from_tty,
 }
 
 static void
-set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
+set_schedlock_func (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (!target_can_lock_scheduler)
     {
@@ -9095,7 +9093,7 @@ static const char *const exec_direction_names[] = {
 };
 
 static void
-set_exec_direction_func (char *args, int from_tty,
+set_exec_direction_func (const char *args, int from_tty,
 			 struct cmd_list_element *cmd)
 {
   if (target_can_execute_reverse)
diff --git a/gdb/language.c b/gdb/language.c
index ecdf431743..e67f9aea34 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -155,7 +155,8 @@ show_language_command (struct ui_file *file, int from_tty,
 
 /* Set command.  Change the current working language.  */
 static void
-set_language_command (char *ignore, int from_tty, struct cmd_list_element *c)
+set_language_command (const char *ignore,
+		      int from_tty, struct cmd_list_element *c)
 {
   enum language flang = language_unknown;
 
@@ -252,7 +253,8 @@ show_range_command (struct ui_file *file, int from_tty,
 
 /* Set command.  Change the setting for range checking.  */
 static void
-set_range_command (char *ignore, int from_tty, struct cmd_list_element *c)
+set_range_command (const char *ignore,
+		   int from_tty, struct cmd_list_element *c)
 {
   if (strcmp (range, "on") == 0)
     {
@@ -326,7 +328,7 @@ show_case_command (struct ui_file *file, int from_tty,
 /* Set command.  Change the setting for case sensitivity.  */
 
 static void
-set_case_command (char *ignore, int from_tty, struct cmd_list_element *c)
+set_case_command (const char *ignore, int from_tty, struct cmd_list_element *c)
 {
    if (strcmp (case_sensitive, "on") == 0)
      {
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 1acb6ce0b2..ea032fc63a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -92,7 +92,7 @@ show_auto_load_thread_db (struct ui_file *file, int from_tty,
 }
 
 static void
-set_libthread_db_search_path (char *ignored, int from_tty,
+set_libthread_db_search_path (const char *ignored, int from_tty,
 			      struct cmd_list_element *c)
 {
   if (*libthread_db_search_path == '\0')
diff --git a/gdb/maint.c b/gdb/maint.c
index 94293d58c7..34b0462336 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -684,7 +684,7 @@ EXTERN_C void monstartup (unsigned long, unsigned long);
 extern int main ();
 
 static void
-maintenance_set_profile_cmd (char *args, int from_tty,
+maintenance_set_profile_cmd (const char *args, int from_tty,
 			     struct cmd_list_element *c)
 {
   if (maintenance_profile_p == profiling_state)
@@ -715,7 +715,7 @@ maintenance_set_profile_cmd (char *args, int from_tty,
 }
 #else
 static void
-maintenance_set_profile_cmd (char *args, int from_tty,
+maintenance_set_profile_cmd (const char *args, int from_tty,
 			     struct cmd_list_element *c)
 {
   error (_("Profiling support is not available on this system."));
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index a94e329af8..7d4514459b 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -108,7 +108,7 @@ static int mi_async = 0;
 static int mi_async_1 = 0;
 
 static void
-set_mi_async_command (char *args, int from_tty,
+set_mi_async_command (const char *args, int from_tty,
 		      struct cmd_list_element *c)
 {
   if (have_live_inferiors ())
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4eafe3e308..c116c4c8c1 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -555,8 +555,6 @@ mips2_fp_compat (struct frame_info *frame)
 
 static CORE_ADDR heuristic_proc_start (struct gdbarch *, CORE_ADDR);
 
-static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
-
 /* The list of available "set mips " and "show mips " commands.  */
 
 static struct cmd_list_element *setmipscmdlist = NULL;
@@ -854,7 +852,7 @@ static int heuristic_fence_post = 0;
 static int mips64_transfers_32bit_regs_p = 0;
 
 static void
-set_mips64_transfers_32bit_regs (char *args, int from_tty,
+set_mips64_transfers_32bit_regs (const char *args, int from_tty,
 				 struct cmd_list_element *c)
 {
   struct gdbarch_info info;
@@ -6989,7 +6987,7 @@ set_mipsfpu_auto_command (const char *args, int from_tty)
    callable as an sfunc.  */
 
 static void
-reinit_frame_cache_sfunc (char *args, int from_tty,
+reinit_frame_cache_sfunc (const char *args, int from_tty,
 			  struct cmd_list_element *c)
 {
   reinit_frame_cache ();
@@ -8846,7 +8844,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 }
 
 static void
-mips_abi_update (char *ignore_args, int from_tty, struct cmd_list_element *c)
+mips_abi_update (const char *ignore_args,
+		 int from_tty, struct cmd_list_element *c)
 {
   struct gdbarch_info info;
 
diff --git a/gdb/osabi.c b/gdb/osabi.c
index b4850bc9ad..9f3fe3c9fa 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -592,7 +592,7 @@ generic_elf_osabi_sniffer (bfd *abfd)
 }
 
 static void
-set_osabi (char *args, int from_tty, struct cmd_list_element *c)
+set_osabi (const char *args, int from_tty, struct cmd_list_element *c)
 {
   struct gdbarch_info info;
 
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 2198b2678e..a03caa1d4e 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -71,7 +71,8 @@ prepare_to_trace (void)
 }
 
 static void
-set_procfs_trace_cmd (char *args, int from_tty, struct cmd_list_element *c)
+set_procfs_trace_cmd (const char *args,
+		      int from_tty, struct cmd_list_element *c)
 {
 #if 0	/* not sure what I might actually need to do here, if anything */
   if (procfs_file)
@@ -80,7 +81,8 @@ set_procfs_trace_cmd (char *args, int from_tty, struct cmd_list_element *c)
 }
 
 static void
-set_procfs_file_cmd (char *args, int from_tty, struct cmd_list_element *c)
+set_procfs_file_cmd (const char *args,
+		     int from_tty, struct cmd_list_element *c)
 {
   /* Just changed the filename for procfs tracing.
      If a file was already open, close it.  */
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 455c99e516..3f8d4e327d 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -357,7 +357,7 @@ call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
    neither exist, insert a string indicating the Parameter is not
    documented.  */
 static void
-get_set_value (char *args, int from_tty,
+get_set_value (const char *args, int from_tty,
 	       struct cmd_list_element *c)
 {
   PyObject *obj = (PyObject *) get_cmd_context (c);
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 37836e75d0..9530df228d 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -2761,7 +2761,7 @@ cmd_record_full_start (const char *args, int from_tty)
 }
 
 static void
-set_record_full_insn_max_num (char *args, int from_tty,
+set_record_full_insn_max_num (const char *args, int from_tty,
 			      struct cmd_list_element *c)
 {
   if (record_full_insn_num > record_full_insn_max_num)
diff --git a/gdb/record.c b/gdb/record.c
index 5ecdcfc5f9..f3e493a34b 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -758,7 +758,7 @@ validate_history_size (unsigned int *command_var, unsigned int *setting)
    [0..UINT_MAX].  See command_size_to_target_size.  */
 
 static void
-set_record_insn_history_size (char *args, int from_tty,
+set_record_insn_history_size (const char *args, int from_tty,
 			      struct cmd_list_element *c)
 {
   validate_history_size (&record_insn_history_size_setshow_var,
@@ -770,7 +770,7 @@ set_record_insn_history_size (char *args, int from_tty,
    [0..UINT_MAX].  See command_size_to_target_size.  */
 
 static void
-set_record_call_history_size (char *args, int from_tty,
+set_record_call_history_size (const char *args, int from_tty,
 			      struct cmd_list_element *c)
 {
   validate_history_size (&record_call_history_size_setshow_var,
diff --git a/gdb/remote.c b/gdb/remote.c
index 81c8cd509d..5c7d06b3c7 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -718,7 +718,7 @@ set_pspace_remote_exec_file (struct program_space *pspace,
 /* The "set/show remote exec-file" set command hook.  */
 
 static void
-set_remote_exec_file (char *ignored, int from_tty,
+set_remote_exec_file (const char *ignored, int from_tty,
 		      struct cmd_list_element *c)
 {
   gdb_assert (remote_exec_file_var != NULL);
@@ -985,7 +985,7 @@ static int interrupt_on_connect = 0;
 static int remote_break;
 
 static void
-set_remotebreak (char *args, int from_tty, struct cmd_list_element *c)
+set_remotebreak (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (remote_break)
     interrupt_sequence_mode = interrupt_sequence_break;
@@ -1619,7 +1619,7 @@ enum Z_packet_type
 static enum auto_boolean remote_Z_packet_detect;
 
 static void
-set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+set_remote_protocol_Z_packet_cmd (const char *args, int from_tty,
 				  struct cmd_list_element *c)
 {
   int i;
@@ -14071,7 +14071,7 @@ show_range_stepping (struct ui_file *file, int from_tty,
 /* The "set/show range-stepping" set hook.  */
 
 static void
-set_range_stepping (char *ignore_args, int from_tty,
+set_range_stepping (const char *ignore_args, int from_tty,
 		    struct cmd_list_element *c)
 {
   struct remote_state *rs = get_remote_state ();
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index df1a84d76e..092e680581 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -6631,7 +6631,7 @@ show_powerpc_command (const char *args, int from_tty)
 }
 
 static void
-powerpc_set_soft_float (char *args, int from_tty,
+powerpc_set_soft_float (const char *args, int from_tty,
 			struct cmd_list_element *c)
 {
   struct gdbarch_info info;
@@ -6643,7 +6643,7 @@ powerpc_set_soft_float (char *args, int from_tty,
 }
 
 static void
-powerpc_set_vector_abi (char *args, int from_tty,
+powerpc_set_vector_abi (const char *args, int from_tty,
 			struct cmd_list_element *c)
 {
   struct gdbarch_info info;
diff --git a/gdb/serial.c b/gdb/serial.c
index 6866549130..a602857783 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -669,7 +669,7 @@ static const char *parity = parity_none;
 /* Set serial_parity value.  */
 
 static void
-set_parity (char *ignore_args, int from_tty, struct cmd_list_element *c)
+set_parity (const char *ignore_args, int from_tty, struct cmd_list_element *c)
 {
   if (parity == parity_odd)
     serial_parity = GDBPARITY_ODD;
diff --git a/gdb/solib.c b/gdb/solib.c
index b63bb9d495..cb7a5c0b51 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1369,7 +1369,7 @@ reload_shared_libraries_1 (int from_tty)
 }
 
 static void
-reload_shared_libraries (char *ignored, int from_tty,
+reload_shared_libraries (const char *ignored, int from_tty,
 			 struct cmd_list_element *e)
 {
   const struct target_so_ops *ops;
@@ -1424,7 +1424,7 @@ reload_shared_libraries (char *ignored, int from_tty,
    at the start of gdb_sysroot with "target:".  */
 
 static void
-gdb_sysroot_changed (char *ignored, int from_tty,
+gdb_sysroot_changed (const char *ignored, int from_tty,
 		     struct cmd_list_element *e)
 {
   const char *old_prefix = "remote:";
diff --git a/gdb/source.c b/gdb/source.c
index b0bb4827bf..d9d3da051e 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -314,7 +314,8 @@ select_source_symtab (struct symtab *s)
    path list.  The theory is that set(show(dir)) should be a no-op.  */
 
 static void
-set_directories_command (char *args, int from_tty, struct cmd_list_element *c)
+set_directories_command (const char *args,
+			 int from_tty, struct cmd_list_element *c)
 {
   /* This is the value that was set.
      It needs to be processed to maintain $cdir:$cwd and remove dups.  */
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index 32dafa8602..d67985f695 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -645,7 +645,7 @@ objfile_set_sym_fns (struct objfile *objfile, const struct sym_fns *sf)
 }
 
 static void
-set_debug_symfile (char *args, int from_tty, struct cmd_list_element *c)
+set_debug_symfile (const char *args, int from_tty, struct cmd_list_element *c)
 {
   struct program_space *pspace;
   struct objfile *objfile;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 4d6700c85b..43c9febf85 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2667,7 +2667,8 @@ show_ext_args (struct ui_file *file, int from_tty,
 }
 
 static void
-set_ext_lang_command (char *args, int from_tty, struct cmd_list_element *e)
+set_ext_lang_command (const char *args,
+		      int from_tty, struct cmd_list_element *e)
 {
   int i;
   char *cp = ext_args;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c844617c7e..370daac8e8 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1256,7 +1256,7 @@ set_symbol_cache_size (unsigned int new_size)
 /* Called when symbol-cache-size is set.  */
 
 static void
-set_symbol_cache_size_handler (char *args, int from_tty,
+set_symbol_cache_size_handler (const char *args, int from_tty,
 			       struct cmd_list_element *c)
 {
   if (new_symbol_cache_size > MAX_SYMBOL_CACHE_SIZE)
diff --git a/gdb/target-dcache.c b/gdb/target-dcache.c
index 76024403aa..3759866330 100644
--- a/gdb/target-dcache.c
+++ b/gdb/target-dcache.c
@@ -105,7 +105,7 @@ static int stack_cache_enabled = 1;
    except cleanliness.  */
 
 static void
-set_stack_cache (char *args, int from_tty, struct cmd_list_element *c)
+set_stack_cache (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (stack_cache_enabled != stack_cache_enabled_1)
     target_dcache_invalidate ();
@@ -143,7 +143,7 @@ static int code_cache_enabled = 1;
    except cleanliness.  */
 
 static void
-set_code_cache (char *args, int from_tty, struct cmd_list_element *c)
+set_code_cache (const char *args, int from_tty, struct cmd_list_element *c)
 {
   if (code_cache_enabled != code_cache_enabled_1)
     target_dcache_invalidate ();
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 4f5e9d60a6..3a5999c50d 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -1874,7 +1874,7 @@ unset_tdesc_cmd (const char *args, int from_tty)
 }
 
 static void
-set_tdesc_filename_cmd (char *args, int from_tty,
+set_tdesc_filename_cmd (const char *args, int from_tty,
 			struct cmd_list_element *c)
 {
   xfree (target_description_filename);
diff --git a/gdb/target.c b/gdb/target.c
index 8a3cb6e555..b10f744251 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -167,7 +167,7 @@ int may_stop = 1;
 static unsigned int targetdebug = 0;
 
 static void
-set_targetdebug  (char *args, int from_tty, struct cmd_list_element *c)
+set_targetdebug  (const char *args, int from_tty, struct cmd_list_element *c)
 {
   update_current_target ();
 }
@@ -345,7 +345,7 @@ complete_target_initialization (struct target_ops *t)
 /* This is used to implement the various target commands.  */
 
 static void
-open_target (char *args, int from_tty, struct cmd_list_element *command)
+open_target (const char *args, int from_tty, struct cmd_list_element *command)
 {
   struct target_ops *ops = (struct target_ops *) get_cmd_context (command);
 
@@ -3890,7 +3890,7 @@ int target_async_permitted = 1;
 static int target_async_permitted_1 = 1;
 
 static void
-maint_set_target_async_command (char *args, int from_tty,
+maint_set_target_async_command (const char *args, int from_tty,
 				struct cmd_list_element *c)
 {
   if (have_live_inferiors ())
@@ -3943,7 +3943,7 @@ static enum auto_boolean target_non_stop_enabled_1 = AUTO_BOOLEAN_AUTO;
 /* Implementation of "maint set target-non-stop".  */
 
 static void
-maint_set_target_non_stop_command (char *args, int from_tty,
+maint_set_target_non_stop_command (const char *args, int from_tty,
 				   struct cmd_list_element *c)
 {
   if (have_live_inferiors ())
@@ -3999,7 +3999,7 @@ update_target_permissions (void)
    way.  */
 
 static void
-set_target_permissions (char *args, int from_tty,
+set_target_permissions (const char *args, int from_tty,
 			struct cmd_list_element *c)
 {
   if (target_has_execution)
@@ -4020,7 +4020,7 @@ set_target_permissions (char *args, int from_tty,
 /* Set memory write permission independently of observer mode.  */
 
 static void
-set_write_memory_permission (char *args, int from_tty,
+set_write_memory_permission (const char *args, int from_tty,
 			struct cmd_list_element *c)
 {
   /* Make the real values match the user-changed values.  */
diff --git a/gdb/top.c b/gdb/top.c
index e0e7f917cf..b9c9d8b37f 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1771,7 +1771,8 @@ set_readline_history_size (int history_size)
 
 /* Called by do_setshow_command.  */
 static void
-set_history_size_command (char *args, int from_tty, struct cmd_list_element *c)
+set_history_size_command (const char *args,
+			  int from_tty, struct cmd_list_element *c)
 {
   set_readline_history_size (history_size_setshow_var);
 }
@@ -1794,7 +1795,7 @@ int info_verbose = 0;		/* Default verbose msgs off.  */
 
 /* Called by do_setshow_command.  An elaborate joke.  */
 void
-set_verbose (char *args, int from_tty, struct cmd_list_element *c)
+set_verbose (const char *args, int from_tty, struct cmd_list_element *c)
 {
   const char *cmdname = "verbose";
   struct cmd_list_element *showcmd;
@@ -1894,7 +1895,7 @@ show_prompt (struct ui_file *file, int from_tty,
 /* "set editing" command.  */
 
 static void
-set_editing (char *args, int from_tty, struct cmd_list_element *c)
+set_editing (const char *args, int from_tty, struct cmd_list_element *c)
 {
   change_line_handler (set_editing_cmd_var);
   /* Update the control variable so that MI's =cmd-param-changed event
@@ -1933,7 +1934,7 @@ static char *staged_gdb_datadir;
 /* "set" command for the gdb_datadir configuration variable.  */
 
 static void
-set_gdb_datadir (char *args, int from_tty, struct cmd_list_element *c)
+set_gdb_datadir (const char *args, int from_tty, struct cmd_list_element *c)
 {
   set_gdb_data_directory (staged_gdb_datadir);
   observer_notify_gdb_datadir_changed ();
@@ -1950,7 +1951,8 @@ show_gdb_datadir (struct ui_file *file, int from_tty,
 }
 
 static void
-set_history_filename (char *args, int from_tty, struct cmd_list_element *c)
+set_history_filename (const char *args,
+		      int from_tty, struct cmd_list_element *c)
 {
   /* We include the current directory so that if the user changes
      directories the file written will be the same as the one
diff --git a/gdb/top.h b/gdb/top.h
index d5cce6861e..cbb3123cf9 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -286,7 +286,7 @@ extern void set_history (const char *, int);
 
 extern void show_history (const char *, int);
 
-extern void set_verbose (char *, int, struct cmd_list_element *);
+extern void set_verbose (const char *, int, struct cmd_list_element *);
 
 extern char *handle_line_of_input (struct buffer *cmd_line_buffer,
 				   char *rl, int repeat,
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 64158ca086..fdee944ed4 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2913,28 +2913,28 @@ encode_source_string (int tpnum, ULONGEST addr,
    disconnects for some reason.  */
 
 static void
-set_disconnected_tracing (char *args, int from_tty,
+set_disconnected_tracing (const char *args, int from_tty,
 			  struct cmd_list_element *c)
 {
   target_set_disconnected_tracing (disconnected_tracing);
 }
 
 static void
-set_circular_trace_buffer (char *args, int from_tty,
+set_circular_trace_buffer (const char *args, int from_tty,
 			   struct cmd_list_element *c)
 {
   target_set_circular_trace_buffer (circular_trace_buffer);
 }
 
 static void
-set_trace_buffer_size (char *args, int from_tty,
+set_trace_buffer_size (const char *args, int from_tty,
 			   struct cmd_list_element *c)
 {
   target_set_trace_buffer_size (trace_buffer_size);
 }
 
 static void
-set_trace_user (char *args, int from_tty,
+set_trace_user (const char *args, int from_tty,
 		struct cmd_list_element *c)
 {
   int ret;
@@ -2946,7 +2946,7 @@ set_trace_user (char *args, int from_tty,
 }
 
 static void
-set_trace_notes (char *args, int from_tty,
+set_trace_notes (const char *args, int from_tty,
 		 struct cmd_list_element *c)
 {
   int ret;
@@ -2958,7 +2958,7 @@ set_trace_notes (char *args, int from_tty,
 }
 
 static void
-set_trace_stop_notes (char *args, int from_tty,
+set_trace_stop_notes (const char *args, int from_tty,
 		      struct cmd_list_element *c)
 {
   int ret;
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 685cf0621e..cbeff1f3a2 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -348,7 +348,8 @@ tui_get_cmd_list (void)
 /* The set_func hook of "set tui ..." commands that affect the window
    borders on the TUI display.  */
 void
-tui_set_var_cmd (char *null_args, int from_tty, struct cmd_list_element *c)
+tui_set_var_cmd (const char *null_args,
+		 int from_tty, struct cmd_list_element *c)
 {
   if (tui_update_variables () && tui_active)
     tui_rehighlight_all ();
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 15810e4555..427af17ad7 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -672,7 +672,8 @@ show_print_type (const char *args, int from_tty)
 static int print_methods = 1;
 
 static void
-set_print_type_methods (char *args, int from_tty, struct cmd_list_element *c)
+set_print_type_methods (const char *args,
+			int from_tty, struct cmd_list_element *c)
 {
   default_ptype_flags.print_methods = print_methods;
 }
@@ -688,7 +689,8 @@ show_print_type_methods (struct ui_file *file, int from_tty,
 static int print_typedefs = 1;
 
 static void
-set_print_type_typedefs (char *args, int from_tty, struct cmd_list_element *c)
+set_print_type_typedefs (const char *args,
+			 int from_tty, struct cmd_list_element *c)
 {
   default_ptype_flags.print_typedefs = print_typedefs;
 }
diff --git a/gdb/utils.c b/gdb/utils.c
index dd746849c7..f3fc16c7ff 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1459,14 +1459,14 @@ set_width (void)
 }
 
 static void
-set_width_command (char *args, int from_tty, struct cmd_list_element *c)
+set_width_command (const char *args, int from_tty, struct cmd_list_element *c)
 {
   set_screen_size ();
   set_width ();
 }
 
 static void
-set_height_command (char *args, int from_tty, struct cmd_list_element *c)
+set_height_command (const char *args, int from_tty, struct cmd_list_element *c)
 {
   set_screen_size ();
 }
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 2dd383f6d4..f9f9234194 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -84,12 +84,8 @@ struct cmd_list_element *showprintrawlist;
 static int partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr,
 				int len, int *errptr);
 
-static void set_input_radix (char *, int, struct cmd_list_element *);
-
 static void set_input_radix_1 (int, unsigned);
 
-static void set_output_radix (char *, int, struct cmd_list_element *);
-
 static void set_output_radix_1 (int, unsigned);
 
 static void val_print_type_code_flags (struct type *type,
@@ -3001,7 +2997,7 @@ static unsigned input_radix_1 = 10;
    setting the input radix to "10" never changes it!  */
 
 static void
-set_input_radix (char *args, int from_tty, struct cmd_list_element *c)
+set_input_radix (const char *args, int from_tty, struct cmd_list_element *c)
 {
   set_input_radix_1 (from_tty, input_radix_1);
 }
@@ -3038,7 +3034,7 @@ set_input_radix_1 (int from_tty, unsigned radix)
 static unsigned output_radix_1 = 10;
 
 static void
-set_output_radix (char *args, int from_tty, struct cmd_list_element *c)
+set_output_radix (const char *args, int from_tty, struct cmd_list_element *c)
 {
   set_output_radix_1 (from_tty, output_radix_1);
 }
diff --git a/gdb/value.c b/gdb/value.c
index c5588947d7..1782da9a37 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -971,7 +971,7 @@ gdb_static_assert (sizeof (LONGEST) <= MIN_VALUE_FOR_MAX_VALUE_SIZE);
 /* Implement the "set max-value-size" command.  */
 
 static void
-set_max_value_size (char *args, int from_tty,
+set_max_value_size (const char *args, int from_tty,
 		    struct cmd_list_element *c)
 {
   gdb_assert (max_value_size == -1 || max_value_size >= 0);
