aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1aa5ff7..30330af 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -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: