mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 10:03:47 +08:00
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.
This commit is contained in:
parent
bef2b43452
commit
4047852192
@ -1,3 +1,38 @@
|
||||
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.
|
||||
|
@ -251,7 +251,7 @@ static int target_byte_order_user = BFD_ENDIAN_UNKNOWN;
|
||||
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,
|
||||
|
@ -97,7 +97,7 @@ static struct cmd_list_element *showarmcmdlist = NULL;
|
||||
|
||||
/* 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",
|
||||
@ -112,7 +112,7 @@ static enum arm_float_model arm_fp_model = ARM_FLOAT_AUTO;
|
||||
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",
|
||||
@ -125,7 +125,7 @@ static enum arm_abi_kind arm_abi_global = ARM_ABI_AUTO;
|
||||
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",
|
||||
|
@ -373,7 +373,7 @@ show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
|
||||
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,
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -211,7 +211,7 @@ extern struct cmd_list_element *add_info_alias (char *, char *, int);
|
||||
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. */
|
||||
@ -232,7 +232,7 @@ extern show_value_ftype deprecated_show_value_hack;
|
||||
|
||||
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,
|
||||
|
@ -151,7 +151,7 @@ static int usr_cmd_cris_version_valid = 0;
|
||||
|
||||
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
|
||||
|
@ -25,7 +25,7 @@
|
||||
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,
|
||||
|
@ -376,7 +376,7 @@ i386_svr4_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
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,
|
||||
@ -2545,7 +2545,7 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
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,
|
||||
|
10
gdb/infrun.c
10
gdb/infrun.c
@ -389,7 +389,7 @@ void init_infwait_state (void);
|
||||
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
|
||||
@ -778,7 +778,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
|
||||
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,
|
||||
@ -1175,7 +1175,7 @@ infrun_inferior_exit (struct inferior *inf)
|
||||
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,
|
||||
@ -1579,7 +1579,7 @@ resume_cleanups (void *ignore)
|
||||
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,
|
||||
@ -6907,7 +6907,7 @@ int execution_direction = EXEC_FORWARD;
|
||||
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
|
||||
|
@ -1109,10 +1109,10 @@ language_lookup_primitive_type_by_name (const struct language_defn *la,
|
||||
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
|
||||
|
@ -82,7 +82,7 @@ enum
|
||||
|
||||
static const char *mips_abi_string;
|
||||
|
||||
static const char *mips_abi_strings[] = {
|
||||
static const char *const mips_abi_strings[] = {
|
||||
"auto",
|
||||
"n32",
|
||||
"o32",
|
||||
|
@ -41,7 +41,7 @@ static const char python_excp_full[] = "full";
|
||||
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,
|
||||
|
@ -742,7 +742,7 @@ static int wait_forever_enabled_p = 1;
|
||||
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,
|
||||
|
@ -108,7 +108,7 @@ static struct cmd_list_element *showpowerpccmdlist = NULL;
|
||||
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",
|
||||
|
@ -53,7 +53,7 @@ static void serial_logchar (struct ui_file *stream,
|
||||
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;
|
||||
|
||||
|
@ -59,7 +59,7 @@ static struct cmd_list_element *showshcmdlist = NULL;
|
||||
|
||||
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
|
||||
|
@ -59,7 +59,7 @@ void (*deprecated_selected_frame_level_changed_hook) (int);
|
||||
/* 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";
|
||||
|
||||
@ -73,7 +73,7 @@ const char print_entry_values_if_needed[] = "if-needed";
|
||||
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,
|
||||
|
@ -122,7 +122,7 @@ int basenames_may_differ = 0;
|
||||
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,
|
||||
|
@ -107,7 +107,7 @@ static void parse_scrolling_args (char *,
|
||||
#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",
|
||||
@ -115,7 +115,7 @@ static const char *tui_border_kind_enums[] = {
|
||||
};
|
||||
|
||||
/* 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",
|
||||
|
@ -886,7 +886,7 @@ can_dump_core (const char *reason)
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user