aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-09-14 22:45:49 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-09-14 22:45:49 +0000
commitf69ecb9c9abcd89d0a69e2bf309b01eb2eff7618 (patch)
tree645baf263476b98bd2b50f48797baaea189055a7 /gdb/dbxread.c
parent809ee7e0365ed037cbb26ca3d9cc44431bb0f4b1 (diff)
downloadgdb-f69ecb9c9abcd89d0a69e2bf309b01eb2eff7618.zip
gdb-f69ecb9c9abcd89d0a69e2bf309b01eb2eff7618.tar.gz
gdb-f69ecb9c9abcd89d0a69e2bf309b01eb2eff7618.tar.bz2
* xcoffread.c (read_xcoff_symtab): Fix obsolete comment about
mst_solib_trampoline. * f-valprint.c (f_val_print): Change cast of valaddr from CORE_ADDR * to char **, since that is how it is used. * dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names using obsavestring, and pass that to prim_record_minimal_symbol. Having the objfile point to bfd_asymbol_name directly doesn't work if we save and restore a mapped symbol file.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 4ee97f3..a0a9820 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -898,6 +898,7 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
long dynrel_count;
arelent **dynrels;
CORE_ADDR sym_value;
+ 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
@@ -960,8 +961,12 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
if (sym->flags & BSF_GLOBAL)
type |= N_EXT;
- record_minimal_symbol ((char *) bfd_asymbol_name (sym), sym_value,
- type, objfile);
+ name = (char *) bfd_asymbol_name (sym);
+ record_minimal_symbol
+ (obsavestring (name, strlen (name), &objfile -> symbol_obstack),
+ sym_value,
+ type,
+ objfile);
}
}
@@ -1013,10 +1018,12 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
continue;
}
- prim_record_minimal_symbol (bfd_asymbol_name (*rel->sym_ptr_ptr),
- address,
- mst_solib_trampoline,
- objfile);
+ name = bfd_asymbol_name (*rel->sym_ptr_ptr);
+ prim_record_minimal_symbol
+ (obsavestring (name, strlen (name), &objfile -> symbol_obstack),
+ address,
+ mst_solib_trampoline,
+ objfile);
}
do_cleanups (back_to);