diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-01-28 18:08:22 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-01-28 18:08:22 +0000 |
commit | 4047852192599c6da7da3bf8b3d8fae8b022e1d7 (patch) | |
tree | 655d33920cd4c2a45ff193aafd077ce457ecde61 /gdb/cli | |
parent | bef2b4345273a0279d89f5b79037eab6279d2883 (diff) | |
download | gdb-4047852192599c6da7da3bf8b3d8fae8b022e1d7.zip gdb-4047852192599c6da7da3bf8b3d8fae8b022e1d7.tar.gz gdb-4047852192599c6da7da3bf8b3d8fae8b022e1d7.tar.bz2 |
gdb/
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.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 2 | ||||
-rw-r--r-- | gdb/cli/cli-decode.c | 4 | ||||
-rw-r--r-- | gdb/cli/cli-decode.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 9c118e1..5eeab41 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -201,7 +201,7 @@ static const char script_ext_off[] = "off"; 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, diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index f168ff1..da5f917 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -412,7 +412,7 @@ add_setshow_cmd_full (char *name, 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, @@ -1733,7 +1733,7 @@ complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word) "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) { diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index 946f96d..6027123 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -189,7 +189,7 @@ struct cmd_list_element /* 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; |