static void sort_blocks (struct symtab *);
-static struct partial_symtab *new_psymtab (const char *, struct objfile *);
+static legacy_psymtab *new_psymtab (const char *, struct objfile *);
static void psymtab_to_symtab_1 (struct objfile *objfile,
- struct partial_symtab *, const char *);
+ legacy_psymtab *, const char *);
static void add_block (struct block *, struct symtab *);
and reorders the symtab list at the end. SELF is not NULL. */
static void
-mdebug_read_symtab (struct partial_symtab *self, struct objfile *objfile)
+mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
if (info_verbose)
{
struct pst_map
{
- struct partial_symtab *pst; /* the psymtab proper */
+ legacy_psymtab *pst; /* the psymtab proper */
long n_globals; /* exported globals (external symbols) */
long globals_offset; /* cumulative */
};
static void
parse_procedure (PDR *pr, struct compunit_symtab *search_symtab,
- struct partial_symtab *pst)
+ legacy_psymtab *pst)
{
struct symbol *s, *i;
const struct block *b;
EXTR *ext_in;
EXTR *ext_in_end;
SYMR sh;
- struct partial_symtab *pst;
+ legacy_psymtab *pst;
int textlow_not_set = 1;
/* List of current psymtab's include files. */
EXTR *extern_tab;
struct pst_map *fdr_to_pst;
/* Index within current psymtab dependency list. */
- struct partial_symtab **dependency_list;
+ legacy_psymtab **dependency_list;
int dependencies_used, dependencies_allocated;
char *name;
enum language prev_language;
dependencies_allocated = 30;
dependencies_used = 0;
dependency_list =
- (struct partial_symtab **) alloca (dependencies_allocated *
- sizeof (struct partial_symtab *));
+ (legacy_psymtab **) alloca (dependencies_allocated *
+ sizeof (legacy_psymtab *));
set_last_source_file (NULL);
fdr_to_pst = fdr_to_pst_holder.data ();
fdr_to_pst++;
{
- struct partial_symtab *new_pst = new_psymtab ("", objfile);
+ legacy_psymtab *new_pst = new_psymtab ("", objfile);
fdr_to_pst[-1].pst = new_pst;
FDR_IDX (new_pst) = -1;
/* Pass 3 over files, over local syms: fill in static symbols. */
for (f_idx = 0; f_idx < hdr->ifdMax; f_idx++)
{
- struct partial_symtab *save_pst;
+ legacy_psymtab *save_pst;
EXTR *ext_ptr;
CORE_ADDR textlow;
textlow = fh->adr;
else
textlow = 0;
- pst = new partial_symtab (fdr_name (fh), objfile, textlow);
+ pst = new legacy_psymtab (fdr_name (fh), objfile, textlow);
pst->read_symtab_private = XOBNEW (&objfile->objfile_obstack, symloc);
memset (pst->read_symtab_private, 0, sizeof (struct symloc));
PENDING_LIST (pst) = pending_list;
/* The way to turn this into a symtab is to call... */
- pst->read_symtab = mdebug_read_symtab;
+ pst->legacy_read_symtab = mdebug_read_symtab;
/* Set up language for the pst.
The language from the FDR is used if it is unambigious (e.g. cfront
{ /* Here if prev stab wasn't N_SO. */
if (pst)
{
- pst = (struct partial_symtab *) 0;
+ pst = (legacy_psymtab *) 0;
includes_used = 0;
dependencies_used = 0;
}
if (pst
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
- pst = (struct partial_symtab *) 0;
+ pst = (legacy_psymtab *) 0;
includes_used = 0;
dependencies_used = 0;
}
/* Remove the dummy psymtab created for -O3 images above, if it is
still empty, to enable the detection of stripped executables. */
- pst = objfile->partial_symtabs->psymtabs;
- if (pst->next == NULL
- && pst->number_of_dependencies == 0
- && pst->n_global_syms == 0
- && pst->n_static_syms == 0)
- objfile->partial_symtabs->discard_psymtab (pst);
+ partial_symtab *pst_del = objfile->partial_symtabs->psymtabs;
+ if (pst_del->next == NULL
+ && pst_del->number_of_dependencies == 0
+ && pst_del->n_global_syms == 0
+ && pst_del->n_static_syms == 0)
+ objfile->partial_symtabs->discard_psymtab (pst_del);
}
/* If the current psymbol has an enumerated type, we need to add
static void
psymtab_to_symtab_1 (struct objfile *objfile,
- struct partial_symtab *pst, const char *filename)
+ legacy_psymtab *pst, const char *filename)
{
bfd_size_type external_sym_size;
bfd_size_type external_pdr_size;
gdb_flush (gdb_stdout);
}
/* We only pass the filename for debug purposes. */
- psymtab_to_symtab_1 (objfile, pst->dependencies[i],
+ psymtab_to_symtab_1 (objfile, (legacy_psymtab *) pst->dependencies[i],
pst->dependencies[i]->filename);
}
/* Allocate a new partial_symtab NAME. */
-static struct partial_symtab *
+static legacy_psymtab *
new_psymtab (const char *name, struct objfile *objfile)
{
- struct partial_symtab *psymtab;
+ legacy_psymtab *psymtab;
- psymtab = new partial_symtab (name, objfile);
+ psymtab = new legacy_psymtab (name, objfile);
/* Keep a backpointer to the file's symbols. */
PENDING_LIST (psymtab) = pending_list;
/* The way to turn this into a symtab is to call... */
- psymtab->read_symtab = mdebug_read_symtab;
+ psymtab->legacy_read_symtab = mdebug_read_symtab;
return (psymtab);
}