* solib-svr4.c (solib_break_names): Constify.
(bkpt_names, main_name_list): Constify.
(match_main): Constify soname arg.
(bfd_lookup_symbol): Constify symname arg.
(enable_break): Constify bkpt_namep.
* symtab.c (search_symbols): Constify types, types2, types3, types4.
(symtab_symbol_info): Constify classnames.
+2010-08-03 Doug Evans <dje@google.com>
+
+ * breakpoint.c (bpdisp_text): Constify bpdisps.
+ * solib-svr4.c (solib_break_names): Constify.
+ (bkpt_names, main_name_list): Constify.
+ (match_main): Constify soname arg.
+ (bfd_lookup_symbol): Constify symname arg.
+ (enable_break): Constify bkpt_namep.
+ * symtab.c (search_symbols): Constify types, types2, types3, types4.
+ (symtab_symbol_info): Constify classnames.
+
2010-08-03 Phil Muldoon <pmuldoon@redhat.com>
* NEWS: Document Python value inferior function calls.
{
/* NOTE: the following values are a part of MI protocol and represent
values of 'disp' field returned when inferior stops at a breakpoint. */
- static char *bpdisps[] = {"del", "dstp", "dis", "keep"};
+ static const char * const bpdisps[] = {"del", "dstp", "dis", "keep"};
return bpdisps[(int) disp];
}
SVR4 systems will fall back to using a symbol as the "startup
mapping complete" breakpoint address. */
-static char *solib_break_names[] =
+static const char * const solib_break_names[] =
{
"r_debug_state",
"_r_debug_state",
NULL
};
-static char *bkpt_names[] =
+static const char * const bkpt_names[] =
{
"_start",
"__start",
NULL
};
-static char *main_name_list[] =
+static const char * const main_name_list[] =
{
"main_$main",
NULL
/* Local function prototypes */
-static int match_main (char *);
-
-static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
+static int match_main (const char *);
/*
*/
static CORE_ADDR
-bfd_lookup_symbol (bfd *abfd, char *symname)
+bfd_lookup_symbol (bfd *abfd, const char *symname)
{
long storage_needed;
asymbol *sym;
non-zero iff SONAME matches one of the known main executable names. */
static int
-match_main (char *soname)
+match_main (const char *soname)
{
- char **mainp;
+ const char * const *mainp;
for (mainp = main_name_list; *mainp != NULL; mainp++)
{
enable_break (struct svr4_info *info, int from_tty)
{
struct minimal_symbol *msymbol;
- char **bkpt_namep;
+ const char * const *bkpt_namep;
asection *interp_sect;
gdb_byte *interp_name;
CORE_ADDR sym_addr;
struct minimal_symbol *msymbol;
char *val;
int found_misc = 0;
- static enum minimal_symbol_type types[]
+ static const enum minimal_symbol_type types[]
= {mst_data, mst_text, mst_abs, mst_unknown};
- static enum minimal_symbol_type types2[]
+ static const enum minimal_symbol_type types2[]
= {mst_bss, mst_file_text, mst_abs, mst_unknown};
- static enum minimal_symbol_type types3[]
+ static const enum minimal_symbol_type types3[]
= {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown};
- static enum minimal_symbol_type types4[]
+ static const enum minimal_symbol_type types4[]
= {mst_file_bss, mst_text, mst_abs, mst_unknown};
enum minimal_symbol_type ourtype;
enum minimal_symbol_type ourtype2;
static void
symtab_symbol_info (char *regexp, domain_enum kind, int from_tty)
{
- static char *classnames[] = {"variable", "function", "type", "method"};
+ static const char * const classnames[] =
+ {"variable", "function", "type", "method"};
struct symbol_search *symbols;
struct symbol_search *p;
struct cleanup *old_chain;