Code cleanup: Make 1440 bytes of data segment read-only.
* arch-utils.c (endian_enum): Make it const char *const [].
* arm-tdep.c (fp_model_strings, arm_abi_strings, arm_mode_strings):
Likewise.
* breakpoint.c (always_inserted_enums): Likewise.
* cli/cli-cmds.c (script_ext_enums): Likewise.
* cli/cli-decode.c (add_setshow_enum_cmd, complete_on_enum): Make the
enumlist parameter const char *const *.
* cli/cli-decode.h (struct cmd_list_element): Make the enums field
const char *const *.
* command.h (complete_on_enum, add_setshow_enum_cmd): Make the enumlist
parameter const char *const *.
* cris-tdep.c (cris_modes): Make it const char *const [].
* filesystem.c (target_file_system_kinds): Likewise.
* i386-tdep.c (valid_flavors, valid_conventions): Likewise.
* infrun.c (follow_fork_mode_kind_names, follow_exec_mode_names)
(can_use_displaced_stepping_enum, scheduler_enums)
(exec_direction_names): Likewise.
* language.c (_initialize_language): Make the type_or_range_names and
case_sensitive_names variables const char *const [].
* mips-tdep.c (mips_abi_strings): Make it const char *const [].
* python/python.c (python_excp_enums): Likewise.
* remote.c (interrupt_sequence_modes): Likewise.
* rs6000-tdep.c (powerpc_vector_strings): Likewise.
* serial.c (logbase_enums): Likewise.
* sh-tdep.c (sh_cc_enum): Likewise.
* stack.c (print_frame_arguments_choices, print_entry_values_choices):
Likewise.
* symtab.c (multiple_symbols_modes): Likewise.
* tui/tui-win.c (tui_border_kind_enums, tui_border_mode_enums):
Likewise.
* utils.c (internal_problem_modes): Likewise.
+2012-01-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup: Make 1440 bytes of data segment read-only.
+ * arch-utils.c (endian_enum): Make it const char *const [].
+ * arm-tdep.c (fp_model_strings, arm_abi_strings, arm_mode_strings):
+ Likewise.
+ * breakpoint.c (always_inserted_enums): Likewise.
+ * cli/cli-cmds.c (script_ext_enums): Likewise.
+ * cli/cli-decode.c (add_setshow_enum_cmd, complete_on_enum): Make the
+ enumlist parameter const char *const *.
+ * cli/cli-decode.h (struct cmd_list_element): Make the enums field
+ const char *const *.
+ * command.h (complete_on_enum, add_setshow_enum_cmd): Make the enumlist
+ parameter const char *const *.
+ * cris-tdep.c (cris_modes): Make it const char *const [].
+ * filesystem.c (target_file_system_kinds): Likewise.
+ * i386-tdep.c (valid_flavors, valid_conventions): Likewise.
+ * infrun.c (follow_fork_mode_kind_names, follow_exec_mode_names)
+ (can_use_displaced_stepping_enum, scheduler_enums)
+ (exec_direction_names): Likewise.
+ * language.c (_initialize_language): Make the type_or_range_names and
+ case_sensitive_names variables const char *const [].
+ * mips-tdep.c (mips_abi_strings): Make it const char *const [].
+ * python/python.c (python_excp_enums): Likewise.
+ * remote.c (interrupt_sequence_modes): Likewise.
+ * rs6000-tdep.c (powerpc_vector_strings): Likewise.
+ * serial.c (logbase_enums): Likewise.
+ * sh-tdep.c (sh_cc_enum): Likewise.
+ * stack.c (print_frame_arguments_choices, print_entry_values_choices):
+ Likewise.
+ * symtab.c (multiple_symbols_modes): Likewise.
+ * tui/tui-win.c (tui_border_kind_enums, tui_border_mode_enums):
+ Likewise.
+ * utils.c (internal_problem_modes): Likewise.
+
2012-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix the 2012-01-26 regression by la_get_symbol_name_match_p.
static const char endian_big[] = "big";
static const char endian_little[] = "little";
static const char endian_auto[] = "auto";
-static const char *endian_enum[] =
+static const char *const endian_enum[] =
{
endian_big,
endian_little,
/* The type of floating-point to use. Keep this in sync with enum
arm_float_model, and the help string in _initialize_arm_tdep. */
-static const char *fp_model_strings[] =
+static const char *const fp_model_strings[] =
{
"auto",
"softfpa",
static const char *current_fp_model = "auto";
/* The ABI to use. Keep this in sync with arm_abi_kind. */
-static const char *arm_abi_strings[] =
+static const char *const arm_abi_strings[] =
{
"auto",
"APCS",
static const char *arm_abi_string = "auto";
/* The execution mode to assume. */
-static const char *arm_mode_strings[] =
+static const char *const arm_mode_strings[] =
{
"auto",
"arm",
static const char always_inserted_auto[] = "auto";
static const char always_inserted_on[] = "on";
static const char always_inserted_off[] = "off";
-static const char *always_inserted_enums[] = {
+static const char *const always_inserted_enums[] = {
always_inserted_auto,
always_inserted_off,
always_inserted_on,
static const char script_ext_soft[] = "soft";
static const char script_ext_strict[] = "strict";
-static const char *script_ext_enums[] = {
+static const char *const script_ext_enums[] = {
script_ext_off,
script_ext_soft,
script_ext_strict,
void
add_setshow_enum_cmd (char *name,
enum command_class class,
- const char *enumlist[],
+ const char *const *enumlist,
const char **var,
const char *set_doc,
const char *show_doc,
"oobar"; if WORD is "baz/foo", return "baz/foobar". */
char **
-complete_on_enum (const char *enumlist[],
+complete_on_enum (const char *const *enumlist,
char *text,
char *word)
{
/* Pointer to NULL terminated list of enumerated values (like
argv). */
- const char **enums;
+ const char *const *enums;
/* Pointer to command strings of user-defined commands */
struct command_line *user_commands;
extern char **complete_on_cmdlist (struct cmd_list_element *,
char *, char *);
-extern char **complete_on_enum (const char *enumlist[],
+extern char **complete_on_enum (const char *const *enumlist,
char *, char *);
/* Functions that implement commands about CLI commands. */
extern void add_setshow_enum_cmd (char *name,
enum command_class class,
- const char *enumlist[],
+ const char *const *enumlist,
const char **var,
const char *set_doc,
const char *show_doc,
static const char cris_mode_normal[] = "normal";
static const char cris_mode_guru[] = "guru";
-static const char *cris_modes[] = {
+static const char *const cris_modes[] = {
cris_mode_normal,
cris_mode_guru,
0
const char file_system_kind_auto[] = "auto";
const char file_system_kind_unix[] = "unix";
const char file_system_kind_dos_based[] = "dos-based";
-const char *target_file_system_kinds[] =
+const char *const target_file_system_kinds[] =
{
file_system_kind_auto,
file_system_kind_unix,
its legitimate values. */
static const char att_flavor[] = "att";
static const char intel_flavor[] = "intel";
-static const char *valid_flavors[] =
+static const char *const valid_flavors[] =
{
att_flavor,
intel_flavor,
static const char default_struct_convention[] = "default";
static const char pcc_struct_convention[] = "pcc";
static const char reg_struct_convention[] = "reg";
-static const char *valid_conventions[] =
+static const char *const valid_conventions[] =
{
default_struct_convention,
pcc_struct_convention,
static const char follow_fork_mode_child[] = "child";
static const char follow_fork_mode_parent[] = "parent";
-static const char *follow_fork_mode_kind_names[] = {
+static const char *const follow_fork_mode_kind_names[] = {
follow_fork_mode_child,
follow_fork_mode_parent,
NULL
static const char follow_exec_mode_new[] = "new";
static const char follow_exec_mode_same[] = "same";
-static const char *follow_exec_mode_names[] =
+static const char *const follow_exec_mode_names[] =
{
follow_exec_mode_new,
follow_exec_mode_same,
static const char can_use_displaced_stepping_auto[] = "auto";
static const char can_use_displaced_stepping_on[] = "on";
static const char can_use_displaced_stepping_off[] = "off";
-static const char *can_use_displaced_stepping_enum[] =
+static const char *const can_use_displaced_stepping_enum[] =
{
can_use_displaced_stepping_auto,
can_use_displaced_stepping_on,
static const char schedlock_off[] = "off";
static const char schedlock_on[] = "on";
static const char schedlock_step[] = "step";
-static const char *scheduler_enums[] = {
+static const char *const scheduler_enums[] = {
schedlock_off,
schedlock_on,
schedlock_step,
static const char exec_forward[] = "forward";
static const char exec_reverse[] = "reverse";
static const char *exec_direction = exec_forward;
-static const char *exec_direction_names[] = {
+static const char *const exec_direction_names[] = {
exec_forward,
exec_reverse,
NULL
void
_initialize_language (void)
{
- static const char *type_or_range_names[]
+ static const char *const type_or_range_names[]
= { "on", "off", "warn", "auto", NULL };
- static const char *case_sensitive_names[]
+ static const char *const case_sensitive_names[]
= { "on", "off", "auto", NULL };
language_gdbarch_data
static const char *mips_abi_string;
-static const char *mips_abi_strings[] = {
+static const char *const mips_abi_strings[] = {
"auto",
"n32",
"o32",
static const char python_excp_message[] = "message";
/* "set python print-stack" choices. */
-static const char *python_excp_enums[] =
+static const char *const python_excp_enums[] =
{
python_excp_none,
python_excp_full,
const char interrupt_sequence_control_c[] = "Ctrl-C";
const char interrupt_sequence_break[] = "BREAK";
const char interrupt_sequence_break_g[] = "BREAK-g";
-static const char *interrupt_sequence_modes[] =
+static const char *const interrupt_sequence_modes[] =
{
interrupt_sequence_control_c,
interrupt_sequence_break,
static enum auto_boolean powerpc_soft_float_global = AUTO_BOOLEAN_AUTO;
/* The vector ABI to use. Keep this in sync with powerpc_vector_abi. */
-static const char *powerpc_vector_strings[] =
+static const char *const powerpc_vector_strings[] =
{
"auto",
"generic",
static const char logbase_hex[] = "hex";
static const char logbase_octal[] = "octal";
static const char logbase_ascii[] = "ascii";
-static const char *logbase_enums[] =
+static const char *const logbase_enums[] =
{logbase_hex, logbase_octal, logbase_ascii, NULL};
static const char *serial_logbase = logbase_ascii;
\f
static const char sh_cc_gcc[] = "gcc";
static const char sh_cc_renesas[] = "renesas";
-static const char *sh_cc_enum[] = {
+static const char *const sh_cc_enum[] = {
sh_cc_gcc,
sh_cc_renesas,
NULL
/* The possible choices of "set print frame-arguments", and the value
of this setting. */
-static const char *print_frame_arguments_choices[] =
+static const char *const print_frame_arguments_choices[] =
{"all", "scalars", "none", NULL};
static const char *print_frame_arguments = "scalars";
const char print_entry_values_both[] = "both";
const char print_entry_values_compact[] = "compact";
const char print_entry_values_default[] = "default";
-static const char *print_entry_values_choices[] =
+static const char *const print_entry_values_choices[] =
{
print_entry_values_no,
print_entry_values_only,
const char multiple_symbols_ask[] = "ask";
const char multiple_symbols_all[] = "all";
const char multiple_symbols_cancel[] = "cancel";
-static const char *multiple_symbols_modes[] =
+static const char *const multiple_symbols_modes[] =
{
multiple_symbols_ask,
multiple_symbols_all,
#endif
/* Possible values for tui-border-kind variable. */
-static const char *tui_border_kind_enums[] = {
+static const char *const tui_border_kind_enums[] = {
"space",
"ascii",
"acs",
};
/* Possible values for tui-border-mode and tui-active-border-mode. */
-static const char *tui_border_mode_enums[] = {
+static const char *const tui_border_mode_enums[] = {
"normal",
"standout",
"reverse",
const char internal_problem_ask[] = "ask";
const char internal_problem_yes[] = "yes";
const char internal_problem_no[] = "no";
-static const char *internal_problem_modes[] =
+static const char *const internal_problem_modes[] =
{
internal_problem_ask,
internal_problem_yes,