static void add_this_object_header_file (int);
-static legacy_psymtab *start_psymtab (struct objfile *, const char *,
- CORE_ADDR, int);
+static legacy_psymtab *start_psymtab (psymtab_storage *, struct objfile *,
+ const char *, CORE_ADDR, int);
/* Free up old header file tables. */
/* Read stabs data from executable file and define symbols. */
- psymtab_storage *partial_symtabs = objfile->partial_symtabs.get ();
+ psymbol_functions *psf = new psymbol_functions ();
+ psymtab_storage *partial_symtabs = psf->get_partial_symtabs ().get ();
+ objfile->qf.emplace_front (psf);
read_dbx_symtab (reader, partial_symtabs, objfile);
/* Install any minimal symbols that have been collected as the current
if (!pst)
{
- pst = start_psymtab (objfile,
+ pst = start_psymtab (partial_symtabs, objfile,
namestring, valu,
first_so_symnum * symbol_size);
pst->dirname = dirname_nso;
if (!p)
continue; /* Not a debugging symbol. */
- sym_len = 0;
+ sym_len = 0;
sym_name = NULL; /* pacify "gcc -Werror" */
- if (psymtab_language == language_cplus)
- {
+ if (psymtab_language == language_cplus)
+ {
std::string name (namestring, p - namestring);
gdb::unique_xmalloc_ptr<char> new_name
= cp_canonicalize_string (name.c_str ());
}
}
- if (sym_len == 0)
- {
- sym_name = namestring;
- sym_len = p - namestring;
- }
+ if (sym_len == 0)
+ {
+ sym_name = namestring;
+ sym_len = p - namestring;
+ }
/* Main processing section for debugging symbols which
the initial read through the symbol tables needs to worry
VAR_DOMAIN, LOC_STATIC,
data_sect_index,
psymbol_placement::STATIC,
- nlist.n_value, psymtab_language, objfile);
+ nlist.n_value, psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'G':
VAR_DOMAIN, LOC_STATIC,
data_sect_index,
psymbol_placement::GLOBAL,
- nlist.n_value, psymtab_language, objfile);
+ nlist.n_value, psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'T':
pst->add_psymbol (gdb::string_view (sym_name, sym_len),
true, STRUCT_DOMAIN, LOC_TYPEDEF, -1,
psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
pst->add_psymbol (gdb::string_view (sym_name, sym_len),
true, VAR_DOMAIN, LOC_TYPEDEF, -1,
psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
p += 1;
}
}
pst->add_psymbol (gdb::string_view (sym_name, sym_len),
true, VAR_DOMAIN, LOC_TYPEDEF, -1,
psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
}
check_enum:
/* If this is an enumerated type, we need to
pst->add_psymbol (gdb::string_view (p, q - p), true,
VAR_DOMAIN, LOC_CONST, -1,
psymbol_placement::STATIC, 0,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
/* Point past the name. */
p = q;
/* Skip over the value. */
pst->add_psymbol (gdb::string_view (sym_name, sym_len), true,
VAR_DOMAIN, LOC_CONST, -1,
psymbol_placement::STATIC, 0,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'f':
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
psymbol_placement::STATIC,
- nlist.n_value, psymtab_language, objfile);
+ nlist.n_value, psymtab_language,
+ partial_symtabs, objfile);
continue;
/* Global functions were ignored here, but now they
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
psymbol_placement::GLOBAL,
- nlist.n_value, psymtab_language, objfile);
+ nlist.n_value, psymtab_language,
+ partial_symtabs, objfile);
continue;
/* Two things show up here (hopefully); static symbols of
(normal). */
static legacy_psymtab *
-start_psymtab (struct objfile *objfile, const char *filename, CORE_ADDR textlow,
- int ldsymoff)
+start_psymtab (psymtab_storage *partial_symtabs, struct objfile *objfile,
+ const char *filename, CORE_ADDR textlow, int ldsymoff)
{
- legacy_psymtab *result = new legacy_psymtab (filename, objfile, textlow);
+ legacy_psymtab *result = new legacy_psymtab (filename, partial_symtabs,
+ objfile->per_bfd, textlow);
result->read_symtab_private =
XOBNEW (&objfile->objfile_obstack, struct symloc);
for (i = 0; i < num_includes; i++)
{
legacy_psymtab *subpst =
- new legacy_psymtab (include_list[i], objfile);
+ new legacy_psymtab (include_list[i], partial_symtabs, objfile->per_bfd);
subpst->read_symtab_private =
XOBNEW (&objfile->objfile_obstack, struct symloc);
struct block *block;
if (outermost_context_p ())
- {
+ {
lbrac_mismatch_complaint (symnum);
- break;
- }
+ break;
+ }
/* The following check is added before recording line 0 at
end of function so as to handle hand-generated stabs