aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-08-03 22:35:41 +0000
committerDoug Evans <dje@google.com>2010-08-03 22:35:41 +0000
commitbc043ef3f9138891fe0f08235e41f5e35d9682d5 (patch)
tree0a762491c24ca75fff40b6a195bb2fec4690e9b4 /gdb/symtab.c
parentfef830db38dc7b443745fca928d5f05c1f867737 (diff)
downloadgdb-bc043ef3f9138891fe0f08235e41f5e35d9682d5.zip
gdb-bc043ef3f9138891fe0f08235e41f5e35d9682d5.tar.gz
gdb-bc043ef3f9138891fe0f08235e41f5e35d9682d5.tar.bz2
* 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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 4acd4a1..1c05648 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2981,13 +2981,13 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
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;
@@ -3293,7 +3293,8 @@ print_msymbol_info (struct minimal_symbol *msymbol)
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;