{ ".dwframe", NULL },
{ NULL, NULL }, /* eh_frame */
{ NULL, NULL }, /* gdb_index */
+ { NULL, NULL }, /* debug_names */
+ { NULL, NULL }, /* debug_aranges */
23
};
last_csect_name = 0;
start_stabs ();
- start_symtab (objfile, filestring, (char *) NULL, file_start_addr);
+ start_symtab (objfile, filestring, (char *) NULL, file_start_addr,
+ language_unknown);
record_debugformat (debugfmt);
symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum;
max_symnum =
}
start_stabs ();
- start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0);
+ start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0,
+ language_unknown);
record_debugformat (debugfmt);
cur_src_end_addr = first_object_file_end;
/* Done with all files, everything from here on is globals. */
/* Give all csects for this source file the same
name. */
start_symtab (objfile, filestring, NULL,
- (CORE_ADDR) 0);
+ (CORE_ADDR) 0, language_unknown);
record_debugformat (debugfmt);
}
filestring = cs->c_name;
start_stabs ();
- start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0);
+ start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0,
+ language_unknown);
record_debugformat (debugfmt);
last_csect_name = 0;
static void
xcoff_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
{
- struct cleanup *old_chain;
int i;
if (!pst)
/* Init stuff necessary for reading in symbols. */
stabsread_init ();
buildsym_init ();
- old_chain = make_cleanup (really_free_pendings, 0);
+ scoped_free_pendings free_pending;
read_xcoff_symtab (objfile, pst);
-
- do_cleanups (old_chain);
}
pst->readin = 1;
{
bfd *abfd;
int val;
- struct cleanup *back_to;
int num_symbols; /* # of symbols */
file_ptr symtab_offset; /* symbol table and */
file_ptr stringtab_offset; /* string table file offsets */
/* Read the string table. */
init_stringtab (abfd, stringtab_offset, objfile);
- /* Read the .debug section, if present. */
- {
- struct bfd_section *secp;
- bfd_size_type length;
- bfd_byte *debugsec = NULL;
+ /* Read the .debug section, if present and if we're not ignoring
+ it. */
+ if (!(objfile->flags & OBJF_READNEVER))
+ {
+ struct bfd_section *secp;
+ bfd_size_type length;
+ bfd_byte *debugsec = NULL;
- secp = bfd_get_section_by_name (abfd, ".debug");
- if (secp)
- {
- length = bfd_section_size (abfd, secp);
- if (length)
- {
- debugsec
- = (bfd_byte *) obstack_alloc (&objfile->objfile_obstack,
- length);
+ secp = bfd_get_section_by_name (abfd, ".debug");
+ if (secp)
+ {
+ length = bfd_section_size (abfd, secp);
+ if (length)
+ {
+ debugsec
+ = (bfd_byte *) obstack_alloc (&objfile->objfile_obstack,
+ length);
- if (!bfd_get_full_section_contents (abfd, secp, &debugsec))
- {
- error (_("Error reading .debug section of `%s': %s"),
- name, bfd_errmsg (bfd_get_error ()));
- }
- }
- }
- info->debugsec = (char *) debugsec;
- }
+ if (!bfd_get_full_section_contents (abfd, secp, &debugsec))
+ {
+ error (_("Error reading .debug section of `%s': %s"),
+ name, bfd_errmsg (bfd_get_error ()));
+ }
+ }
+ }
+ info->debugsec = (char *) debugsec;
+ }
}
/* Read the symbols. We keep them in core because we will want to
init_psymbol_list (objfile, num_symbols);
free_pending_blocks ();
- back_to = make_cleanup (really_free_pendings, 0);
+ scoped_free_pendings free_pending;
minimal_symbol_reader reader (objfile);
/* Now that the symbol table data of the executable file are all in core,
dwarf2_build_psymtabs (objfile);
dwarf2_build_frame_info (objfile);
-
- do_cleanups (back_to);
}
\f
static void