aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-20 18:25:12 +0000
committerTom Tromey <tromey@redhat.com>2013-08-20 18:25:12 +0000
commitbec71544ee9433508b970323621e4a1d19656ba1 (patch)
tree5135fed356fc86842ff84e2f2dd9ae90eab39b79 /gdb/dbxread.c
parent0002ad5f4575ad8f85bac2989ce4e1e8b99c905b (diff)
downloadgdb-bec71544ee9433508b970323621e4a1d19656ba1.zip
gdb-bec71544ee9433508b970323621e4a1d19656ba1.tar.gz
gdb-bec71544ee9433508b970323621e4a1d19656ba1.tar.bz2
* dbxread.c (record_minimal_symbol): Make 'name' argument const.
Update. (read_dbx_dynamic_symtab): Make 'name' const. Remove casts.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index c0fe2b6..08cfc99 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -291,7 +291,8 @@ static void dbx_symfile_read (struct objfile *, int);
static void dbx_symfile_finish (struct objfile *);
-static void record_minimal_symbol (char *, CORE_ADDR, int, struct objfile *);
+static void record_minimal_symbol (const char *, CORE_ADDR, int,
+ struct objfile *);
static void add_new_header_file (char *, int);
@@ -435,7 +436,7 @@ explicit_lookup_type (int real_filenum, int index)
#endif
static void
-record_minimal_symbol (char *name, CORE_ADDR address, int type,
+record_minimal_symbol (const char *name, CORE_ADDR address, int type,
struct objfile *objfile)
{
enum minimal_symbol_type ms_type;
@@ -491,7 +492,7 @@ record_minimal_symbol (char *name, CORE_ADDR address, int type,
/* Same with virtual function tables, both global and static. */
{
- char *tempstring = name;
+ const char *tempstring = name;
if (tempstring[0] == bfd_get_symbol_leading_char (objfile->obfd))
++tempstring;
@@ -1001,7 +1002,7 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
long dynrel_count;
arelent **dynrels;
CORE_ADDR sym_value;
- char *name;
+ const char *name;
/* Check that the symbol file has dynamic symbols that we know about.
bfd_arch_unknown can happen if we are reading a sun3 symbol file
@@ -1067,7 +1068,7 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
if (sym->flags & BSF_GLOBAL)
type |= N_EXT;
- record_minimal_symbol ((char *) bfd_asymbol_name (sym), sym_value,
+ record_minimal_symbol (bfd_asymbol_name (sym), sym_value,
type, objfile);
}
}
@@ -1121,7 +1122,7 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
continue;
}
- name = (char *) bfd_asymbol_name (*rel->sym_ptr_ptr);
+ name = bfd_asymbol_name (*rel->sym_ptr_ptr);
prim_record_minimal_symbol (name, address, mst_solib_trampoline,
objfile);
}