newline = 0;
if (oldLineTb->item[0].line != 0)
for (newline = 0;
- newline < oldLineTb->nitems && oldLineTb->item[newline].line; ++newline)
+ newline < oldLineTb->nitems && oldLineTb->item[newline].line;
+ ++newline)
newLineTb->item[newline] = oldLineTb->item[newline];
/* Now copy function lines one by one. */
to 32(0x20). So we need to read the first function auxiliary entry
which contains the size. */
if (cs->c_naux > 1 && ISFCN (cs->c_type))
- {
- /* a function entry point. */
+ {
+ /* a function entry point. */
- fcn_start_addr = cs->c_value;
+ fcn_start_addr = cs->c_value;
- /* save the function header info, which will be used
- when `.bf' is seen. */
- fcn_cs_saved = *cs;
+ /* save the function header info, which will be used
+ when `.bf' is seen. */
+ fcn_cs_saved = *cs;
- /* Convert the auxent to something we can access. */
- bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
- 0, cs->c_naux, &fcn_aux_saved);
- continue;
- }
+ /* Convert the auxent to something we can access. */
+ bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
+ 0, cs->c_naux, &fcn_aux_saved);
+ continue;
+ }
/* Read the csect auxiliary header, which is always the last by
convention. */
bfd_coff_swap_aux_in (abfd,
(normal). */
static legacy_psymtab *
-xcoff_start_psymtab (struct objfile *objfile,
+xcoff_start_psymtab (psymtab_storage *partial_symtabs,
+ struct objfile *objfile,
const char *filename, int first_symnum)
{
/* We fill in textlow later. */
- legacy_psymtab *result = new legacy_psymtab (filename, objfile, 0);
+ legacy_psymtab *result = new legacy_psymtab (filename, partial_symtabs,
+ objfile->per_bfd, 0);
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, symloc);
((struct symloc *) subpst->read_symtab_private)->first_symnum = 0;
/* Give all psymtabs for this source file the same
name. */
pst = xcoff_start_psymtab
- (objfile,
+ (partial_symtabs, objfile,
filestring,
symnum_before);
}
else
filestring = namestring;
- pst = xcoff_start_psymtab (objfile,
+ pst = xcoff_start_psymtab (partial_symtabs, objfile,
filestring,
symnum_before);
last_csect_name = NULL;
SECT_OFF_DATA (objfile),
psymbol_placement::STATIC,
symbol.n_value,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'G':
SECT_OFF_DATA (objfile),
psymbol_placement::GLOBAL,
symbol.n_value,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'T':
p - namestring),
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. */
p - namestring),
true, VAR_DOMAIN, LOC_TYPEDEF, -1,
psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
p += 1;
}
}
p - namestring),
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);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
/* Point past the name. */
p = q;
/* Skip over the value. */
p - namestring),
true, VAR_DOMAIN, LOC_CONST, -1,
psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ 0, psymtab_language,
+ partial_symtabs, objfile);
continue;
case 'f':
SECT_OFF_TEXT (objfile),
psymbol_placement::STATIC,
symbol.n_value,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
continue;
/* Global functions were ignored here, but now they
SECT_OFF_TEXT (objfile),
psymbol_placement::GLOBAL,
symbol.n_value,
- psymtab_language, objfile);
+ psymtab_language,
+ partial_symtabs, objfile);
continue;
/* Two things show up here (hopefully); static symbols of
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
- 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);
scan_xcoff_symtab (reader, partial_symtabs, objfile);
/* Install any minimal symbols that have been collected as the current
xcoff_new_init, /* init anything gbl to entire symtab */
xcoff_symfile_init, /* read initial info, setup for sym_read() */
xcoff_initial_scan, /* read a symbol file into symtab */
- NULL, /* sym_read_psymbols */
xcoff_symfile_finish, /* finished with file, cleanup */
xcoff_symfile_offsets, /* xlate offsets ext->int form */
default_symfile_segments, /* Get segment information from a file. */