diff options
author | Fred Fish <fnf@specifix.com> | 1996-07-08 09:05:18 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-07-08 09:05:18 +0000 |
commit | ace4b8d75a3bd81cdaf61a0fec307d631388470d (patch) | |
tree | a58747a97825773044bd6aed6c2c6e650062d8f3 /gdb/dstread.c | |
parent | b7cc3e753094407b5dbb1f4d6c70e679f4fe2172 (diff) | |
download | gdb-ace4b8d75a3bd81cdaf61a0fec307d631388470d.zip gdb-ace4b8d75a3bd81cdaf61a0fec307d631388470d.tar.gz gdb-ace4b8d75a3bd81cdaf61a0fec307d631388470d.tar.bz2 |
(laying some groundwork for a fix for PR 8443)
* coffread.c (record_minimal_symbol): Don't presave name string
on symbol_obstack before passing to prim_record_minimal_symbol.
It now handles saving the string itself.
* dbxread.c (read_dbx_dynamic_symtab): Ditto.
* mipsread.c (read_alphacoff_dynamic_symtab): Ditto.
* os9kread.c (record_minimal_symbol): Ditto.
* solib.c (solib_add_common_symbols): Ditto.
* coffread.c (coff_symtab_read): Don't presave name string on
symbol_obstack before passing to prim_record_minimal_symbol_and_info.
It now handles saving the string itself.
* dbxread.c (record_minimal_symbol): Ditto.
* elfread.c (record_minimal_symbol_and_info): Ditto.
* dstread.c (record_minimal_symbol): Remove static function that just
called prim_record_minimal_symbol with the same args (after change to
prim_record_minimal_symbol to do it's own name string saves).
* nlmread.c (record_minimal_symbol): Ditto.
* somread.c (record_minimal_symbol): Ditto.
* hpread.c (hpread_read_enum_type): Save symbol name on symbol obstack.
(hpread_read_function_type): Ditto.
(hpread_process_one_debug_symbol): Ditto.
* mdebugread.c (parse_symbol): Ditto.
(new_symbol): Ditto.
* minsyms.c (prim_record_minimal_symbol_and_info): Ditto.
* coffread.c (process_coff_symbol): Use obsavestring to save
SYMBOL_NAME, rather than obstack_copy0.
* dstread.c (create_new_symbol): Ditto
* symfile.c (obconcat): Ditto.
* stabsread.c (patch_block_stabs): Ditto.
* xcoffread.c (SYMNAME_ALLOC): Ditto.
* symfile.c (obsavestring): Update comments
* solib.c (solib_add_common_symbols): Remove local var origname.
Diffstat (limited to 'gdb/dstread.c')
-rw-r--r-- | gdb/dstread.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/gdb/dstread.c b/gdb/dstread.c index 16b02f5..c5a79b8 100644 --- a/gdb/dstread.c +++ b/gdb/dstread.c @@ -76,10 +76,6 @@ static void dst_symfile_finish PARAMS ((struct objfile *)); static void -record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type, - struct objfile *)); - -static void dst_end_symtab PARAMS ((struct objfile *)); static void @@ -234,19 +230,6 @@ dst_end_symtab (objfile) last_source_file = NULL; } -static void -record_minimal_symbol (name, address, type, objfile) - char *name; - CORE_ADDR address; - enum minimal_symbol_type type; - struct objfile *objfile; -{ - prim_record_minimal_symbol (savestring (name, strlen (name)), - address, - type, - objfile); -} - /* dst_symfile_init () is the dst-specific initialization routine for reading symbols. @@ -812,8 +795,8 @@ create_new_symbol(objfile, name) struct symbol *sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol)); memset (sym, 0, sizeof (struct symbol)); - SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack, - name, strlen (name)); + SYMBOL_NAME (sym) = obsavestring (name, strlen (name), + &objfile->symbol_obstack); SYMBOL_VALUE (sym) = 0; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; @@ -1476,7 +1459,7 @@ process_dst_block(objfile, entry) case dst_block_function: case dst_block_subroutine: case dst_block_program: - record_minimal_symbol(name, address, mst_text, objfile); + prim_record_minimal_symbol(name, address, mst_text, objfile); function = process_dst_function( objfile, symbol_entry, @@ -1637,7 +1620,7 @@ read_dst_symtab (objfile) } } if (module_num) - record_minimal_symbol("<end_of_program>", + prim_record_minimal_symbol("<end_of_program>", BLOCK_END(block), mst_text, objfile); /* One more faked symbol to make sure nothing can ever run off the * end of the symbol table. This one represents the end of the @@ -1647,7 +1630,7 @@ read_dst_symtab (objfile) * but no functions are ever mapped to an address higher than * 40000000 */ - record_minimal_symbol("<end_of_text>", + prim_record_minimal_symbol("<end_of_text>", (CORE_ADDR) 0x40000000, mst_text, objfile); while (struct_list) |