+2017-11-07 Tom Tromey <tom@tromey.com>
+
+ * ada-lang.c (catch_ada_exception_command): Constify.
+ (catch_assert_command): Constify.
+ * break-catch-throw.c (catch_catch_command, catch_throw_command)
+ (catch_rethrow_command): Constify.
+ (catch_exception_command_1): Constify.
+ * breakpoint.h (add_catch_command): Constify.
+ * break-catch-syscall.c (catch_syscall_command_1): Constify.
+ (catch_syscall_split_args): Constify.
+ * break-catch-sig.c (catch_signal_command): Constify.
+ (catch_signal_split_args): Constify.
+ * cli/cli-decode.h (struct cmd_list_element) <function>: Use
+ cmd_const_sfunc_ftype.
+ * cli/cli-decode.c (add_setshow_cmd_full): Constify.
+ (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
+ (add_setshow_boolean_cmd, add_setshow_filename_cmd)
+ (add_setshow_string_cmd, struct cmd_list_element)
+ (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
+ (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
+ (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
+ Constify.
+ (set_cmd_sfunc): Constify.
+ (empty_sfunc): Constify.
+ * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
+ (add_setshow_boolean_cmd, add_setshow_filename_cmd)
+ (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
+ (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
+ (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
+ (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
+ Constify.
+ (set_cmd_sfunc): Constify.
+ (cmd_sfunc_ftype): Remove.
+ * compile/compile.c (set_compile_args): Constify.
+ * infrun.c (set_disable_randomization): Constify.
+ * infcmd.c (set_args_command, set_cwd_command): Constify.
+ * breakpoint.c (set_condition_evaluation_mode): Constify.
+ (add_catch_command): Constify.
+ (catch_fork_command_1, catch_exec_command_1)
+ (catch_load_command_1, catch_unload_command_1): Constify.
+ (catch_load_or_unload): Constify.
+ * guile/scm-param.c (pascm_set_func): Constify.
+ (add_setshow_generic): Constify.
+ * python/py-param.c (get_set_value): Constify.
+ * top.h (set_verbose): Constify.
+ * tui/tui-win.c (tui_set_var_cmd): Constify.
+ * mi/mi-main.c (set_mi_async_command): Constify.
+ * cli/cli-logging.c (set_logging_overwrite)
+ (set_logging_redirect): Constify.
+ * value.c (set_max_value_size): Constify.
+ * valprint.c (set_input_radix, set_output_radix): Constify.
+ * utils.c (set_width_command, set_height_command): Constify.
+ * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
+ * tracepoint.c (set_disconnected_tracing)
+ (set_circular_trace_buffer, set_trace_buffer_size)
+ (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
+ * top.c (set_history_size_command, set_verbose, set_editing)
+ (set_gdb_datadir, set_history_filename): Constify.
+ * target.c (set_targetdebug, maint_set_target_async_command)
+ (maint_set_target_non_stop_command, set_target_permissions)
+ (set_write_memory_permission): Constify.
+ (open_target): Constify.
+ * target-descriptions.c (set_tdesc_filename_cmd): Constify.
+ * target-dcache.c (set_stack_cache, set_code_cache): Constify.
+ * symtab.c (set_symbol_cache_size_handler): Constify.
+ * symfile.c (set_ext_lang_command): Constify.
+ * symfile-debug.c (set_debug_symfile): Constify.
+ * source.c (set_directories_command): Constify.
+ * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
+ * serial.c (set_parity): Constify.
+ * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
+ * remote.c (set_remote_exec_file, set_remotebreak)
+ (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
+ * record.c (set_record_insn_history_size)
+ (set_record_call_history_size): Constify.
+ * record-full.c (set_record_full_insn_max_num): Constify.
+ * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
+ * osabi.c (set_osabi): Constify.
+ * mips-tdep.c (set_mips64_transfers_32bit_regs)
+ (reinit_frame_cache_sfunc, mips_abi_update): Constify.
+ * maint.c (maintenance_set_profile_cmd): Constify.
+ * linux-thread-db.c (set_libthread_db_search_path): Constify.
+ * language.c (set_language_command, set_range_command)
+ (set_case_command): Constify.
+ * infrun.c (set_non_stop, set_observer_mode)
+ (set_stop_on_solib_events, set_schedlock_func)
+ (set_exec_direction_func): Constify.
+ * infcmd.c (set_inferior_tty_command): Constify.
+ * disasm.c (set_disassembler_options_sfunc): Constify.
+ * demangle.c (set_demangling_command): Constify.
+ * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
+ * cris-tdep.c (set_cris_version, set_cris_mode)
+ (set_cris_dwarf2_cfi): Constify.
+ * corefile.c (set_gnutarget_command): Constify.
+ * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
+ (set_target_wide_charset_sfunc): Constify.
+ * breakpoint.c (update_dprintf_commands): Constify.
+ * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
+ * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
+ (set_disassembly_style_sfunc): Constify.
+ * arch-utils.c (set_endian, set_architecture): Constify.
+ * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
+ * agent.c (set_can_use_agent): Constify.
+
2017-11-07 Tom Tromey <tom@tromey.com>
* go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
/* 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;
/* 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;
}
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. */
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 ();
}
}
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;
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;
/* 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 *,
}
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;
}
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;
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-*)
/* "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')
/* "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')
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;
/* 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;
/* 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 ();
/* 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;
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 = "";
/* 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;
/* 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;
/* 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;
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;
"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;
}
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);
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;
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;
}
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;
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)
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);
/* 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. */
/* '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 ());
/* 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 ());
/* 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 ());
}
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;
}
/* 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)
{
}
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,
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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;
}
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 ();
}
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 ();
}
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.
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
/* 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);
_("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);
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,
}
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;
}
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;
}
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;
}
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)
}
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
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;
}
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);
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;
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,
}
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.
/* 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. */
/* 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);
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);
}
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 ())
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)
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)
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 ();
}
}
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)
{
};
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)
/* 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;
/* 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)
{
/* 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)
{
}
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')
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)
}
#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."));
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 ())
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;
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;
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 ();
}
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;
}
\f
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;
}
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)
}
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. */
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);
}
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)
[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,
[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,
/* 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);
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;
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;
/* 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 ();
}
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;
}
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;
/* 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;
}
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;
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:";
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. */
}
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;
}
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)
{
char *cp = ext_args;
enum language lang;
/* 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)
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 ();
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 ();
}
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);
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 ();
}
/* 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);
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 ())
/* 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 ())
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)
/* 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. */
/* 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);
}
/* 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;
/* "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
/* "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 ();
}
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
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,
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;
}
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;
}
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;
/* 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 ();
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;
}
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;
}
}
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 ();
}
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,
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);
}
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);
}
/* 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);