2004-02-07 Elena Zannoni <ezannoni@redhat.com>

* dbxread.c (dbx_symfile_init, start_psymtab, end_psymtab,
	coffstab_build_psymtabs, elfstab_build_psymtabs)
	(stabsect_build_psymtabs): Replace psymbol_obstack with
	objfile_obstack.
	* dwarf2-frame.c (decode_frame_entry_1): Ditto.
	* dwarf2read.c (dwarf2_build_psymtabs_hard, dwarf2_read_section):
	Ditto.
	* dwarfread.c (scan_compilation_units): Ditto.
	* elfread.c (elfstab_offset_sections): Ditto.
	* hppa-tdep.c (read_unwind_info): Ditto.
	* hpread.c (hpread_build_psymtabs, hpread_start_psymtab)
	(hpread_end_psymtab): Ditto.
	* mdebugread.c (mdebug_build_psymtabs, add_pending)
	(parse_partial_symbols, new_psymtab, elfmdebug_build_psymtabs):
	Ditto.
	* mips-tdep.c (non_heuristic_proc_desc): Ditto.
	* objfiles.c (add_to_objfile_sections)
	(build_objfile_section_table): Ditto.
	(allocate_objfile): Remove init of psymbol_obstack.
	(free_objfile): Remove freeing of psymbol_obstack.
	* objfiles.h (struct objfile): Remove field
	psymbol_obstack. Update comments.
	* pa64solib.c (pa64_solib_add_solib_objfile): Replace
	psymbol_obstack with objfile_obstack.
	* solib-sunos.c (allocate_rt_common_objfile): Remove init of
        psymbol_obstack.
	* somread.c (som_symfile_offsets, init_import_symbols)
	(init_export_symbols): Replace psymbol_obstack with
	objfile_obstack.
	* somsolib.c (som_solib_add_solib_objfile): Ditto.
	* symfile.c (default_symfile_offsets, syms_from_objfile)
	(reread_symbols): Remove freeing and init of psymbol_obstack.
	(cashier_psymtab): Update comment.
	* symmisc.c (print_objfile_statistics): Don't report stats for
	psymbol obstack.
	* symtab.h (struct general_symbol_info, struct partial_symtab):
	Update comments.
	* xcoffread.c (xcoff_start_psymtab, xcoff_end_psymtab, swap_sym)
	(xcoff_symfile_offsets): Replace psymbol_obstack with
	objfile_obstack.
This commit is contained in:
Elena Zannoni
2004-02-07 18:29:54 +00:00
parent 22940a245d
commit 8b92e4d54f
20 changed files with 126 additions and 94 deletions

View File

@@ -485,7 +485,7 @@ default_symfile_offsets (struct objfile *objfile,
objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
obstack_alloc (&objfile->psymbol_obstack,
obstack_alloc (&objfile->objfile_obstack,
SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
memset (objfile->section_offsets, 0,
SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
@@ -690,7 +690,7 @@ syms_from_objfile (struct objfile *objfile,
objfile->num_sections = num_offsets;
objfile->section_offsets
= ((struct section_offsets *)
obstack_alloc (&objfile->psymbol_obstack, size));
obstack_alloc (&objfile->objfile_obstack, size));
memcpy (objfile->section_offsets, offsets, size);
init_objfile_sect_indices (objfile);
@@ -1879,7 +1879,7 @@ reread_symbols (void)
bfd_errmsg (bfd_get_error ()));
/* Save the offsets, we will nuke them with the rest of the
psymbol_obstack. */
objfile_obstack. */
num_offsets = objfile->num_sections;
offsets = ((struct section_offsets *)
alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets)));
@@ -1911,9 +1911,8 @@ reread_symbols (void)
htab_delete (objfile->demangled_names_hash);
objfile->demangled_names_hash = NULL;
}
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
obstack_free (&objfile->objfile_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
objfile->sections = NULL;
objfile->symtabs = NULL;
objfile->psymtabs = NULL;
@@ -1939,12 +1938,10 @@ reread_symbols (void)
it is empty. */
objfile->psymbol_cache = bcache_xmalloc ();
objfile->macro_cache = bcache_xmalloc ();
obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0,
obstack_specify_allocation (&objfile->objfile_obstack, 0, 0,
xmalloc, xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0,
xmalloc, xfree);
obstack_specify_allocation (&objfile->objfile_obstack, 0, 0,
xmalloc, xfree);
if (build_objfile_section_table (objfile))
{
error ("Can't find the file sections in `%s': %s",
@@ -1955,7 +1952,7 @@ reread_symbols (void)
/* We use the same section offsets as from last time. I'm not
sure whether that is always correct for shared libraries. */
objfile->section_offsets = (struct section_offsets *)
obstack_alloc (&objfile->psymbol_obstack,
obstack_alloc (&objfile->objfile_obstack,
SIZEOF_N_SECTION_OFFSETS (num_offsets));
memcpy (objfile->section_offsets, offsets,
SIZEOF_N_SECTION_OFFSETS (num_offsets));
@@ -2279,12 +2276,12 @@ allocate_psymtab (char *filename, struct objfile *objfile)
}
else
psymtab = (struct partial_symtab *)
obstack_alloc (&objfile->psymbol_obstack,
obstack_alloc (&objfile->objfile_obstack,
sizeof (struct partial_symtab));
memset (psymtab, 0, sizeof (struct partial_symtab));
psymtab->filename = obsavestring (filename, strlen (filename),
&objfile->psymbol_obstack);
&objfile->objfile_obstack);
psymtab->symtab = NULL;
/* Prepend it to the psymtab list for the objfile it belongs to.
@@ -2433,7 +2430,7 @@ cashier_psymtab (struct partial_symtab *pst)
partial_symbol lists (global_psymbols/static_psymbols) that
this psymtab points to. These just take up space until all
the psymtabs are reclaimed. Ditto the dependencies list and
filename, which are all in the psymbol_obstack. */
filename, which are all in the objfile_obstack. */
/* We need to cashier any psymtab that has this one as a dependency... */
again: