aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.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/solib-svr4.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/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 1f135d4..9ad67fb 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -80,7 +80,7 @@ struct lm_info
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",
@@ -92,7 +92,7 @@ static char *solib_break_names[] =
NULL
};
-static char *bkpt_names[] =
+static const char * const bkpt_names[] =
{
"_start",
"__start",
@@ -100,7 +100,7 @@ static char *bkpt_names[] =
NULL
};
-static char *main_name_list[] =
+static const char * const main_name_list[] =
{
"main_$main",
NULL
@@ -357,9 +357,7 @@ get_svr4_info (void)
/* Local function prototypes */
-static int match_main (char *);
-
-static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
+static int match_main (const char *);
/*
@@ -387,7 +385,7 @@ static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
*/
static CORE_ADDR
-bfd_lookup_symbol (bfd *abfd, char *symname)
+bfd_lookup_symbol (bfd *abfd, const char *symname)
{
long storage_needed;
asymbol *sym;
@@ -1253,9 +1251,9 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
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++)
{
@@ -1347,7 +1345,7 @@ static int
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;