static struct partial_symtab *
xcoff_start_psymtab (struct objfile *objfile,
- const char *filename, int first_symnum,
- std::vector<partial_symbol *> &global_psymbols,
- std::vector<partial_symbol *> &static_psymbols)
+ const char *filename, int first_symnum)
{
struct partial_symtab *result =
start_psymtab_common (objfile,
filename,
/* We fill in textlow later. */
- 0,
- global_psymbols, static_psymbols);
+ 0);
result->read_symtab_private =
XOBNEW (&objfile->objfile_obstack, struct symloc);
pst->number_of_dependencies = number_dependencies;
if (number_dependencies)
{
- pst->dependencies = XOBNEWVEC (&objfile->objfile_obstack,
- struct partial_symtab *,
- number_dependencies);
+ pst->dependencies
+ = objfile->partial_symtabs->allocate_dependencies (number_dependencies);
memcpy (pst->dependencies, dependency_list,
number_dependencies * sizeof (struct partial_symtab *));
}
/* We could save slight bits of space by only making one of these,
shared by the entire set of include files. FIXME-someday. */
subpst->dependencies =
- XOBNEW (&objfile->objfile_obstack, struct partial_symtab *);
+ objfile->partial_symtabs->allocate_dependencies (1);
subpst->dependencies[0] = pst;
subpst->number_of_dependencies = 1;
- subpst->globals_offset =
- subpst->n_global_syms =
- subpst->statics_offset =
- subpst->n_static_syms = 0;
-
- subpst->readin = 0;
- subpst->compunit_symtab = NULL;
subpst->read_symtab = pst->read_symtab;
}
pst = xcoff_start_psymtab
(objfile,
filestring,
- symnum_before,
- objfile->global_psymbols,
- objfile->static_psymbols);
+ symnum_before);
}
}
/* Activate the misc_func_recorded mechanism for
pst = xcoff_start_psymtab (objfile,
filestring,
- symnum_before,
- objfile->global_psymbols,
- objfile->static_psymbols);
+ symnum_before);
last_csect_name = NULL;
}
break;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
SECT_OFF_DATA (objfile),
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
symbol.n_value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
SECT_OFF_DATA (objfile),
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
symbol.n_value,
psymtab_language, objfile);
continue;
{
add_psymbol_to_list (namestring, p - namestring, 1,
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
p += 1;
}
{
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
}
check_enum:
enum constants in psymtabs, just in symtabs. */
add_psymbol_to_list (p, q - p, 1,
VAR_DOMAIN, LOC_CONST, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
/* Point past the name. */
p = q;
/* Constant, e.g. from "const" in Pascal. */
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_CONST, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
symbol.n_value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
symbol.n_value,
psymtab_language, objfile);
continue;
if (val != size)
perror_with_name (_("reading symbol table"));
- /* If we are reinitializing, or if we have never loaded syms yet, init. */
- if (objfile->global_psymbols.capacity () == 0
- && objfile->static_psymbols.capacity () == 0)
- /* I'm not sure how how good num_symbols is; the rule of thumb in
- init_psymbol_list was developed for a.out. On the one hand,
- num_symbols includes auxents. On the other hand, it doesn't
- include N_SLINE. */
- init_psymbol_list (objfile, num_symbols);
+ /* I'm not sure how how good num_symbols is; the rule of thumb in
+ init_psymbol_list was developed for a.out. On the one hand,
+ num_symbols includes auxents. On the other hand, it doesn't
+ include N_SLINE. */
+ init_psymbol_list (objfile, num_symbols);
scoped_free_pendings free_pending;
minimal_symbol_reader reader (objfile);