New option "set debug symfile on".

* NEWS: Mention "set debug symfile".
	* Makefile.in (SFILES): Add symfile-debug.c.
	(COMMON_OBS): Add symfile-debug.o.
	* elfread.c (elf_symfile_read): Use objfile_set_sym_fns to set the
	objfile's symbol functions.
	* objfiles.h (objfile_set_sym_fns): Declare.
	* symfile-debug.c: New file.
	* symfile.c (syms_from_objfile_1): Use objfile_set_sym_fns to set the
	objfile's symbol functions.
	(reread_symbols): Ditto.
This commit is contained in:
Doug Evans
2013-09-25 23:17:12 +00:00
parent c256e17165
commit 8fb8eb5ca4
9 changed files with 810 additions and 6 deletions

View File

@@ -1419,14 +1419,14 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
if (!objfile_has_partial_symbols (objfile)
&& dwarf2_initialize_objfile (objfile))
objfile->sf = &elf_sym_fns_gdb_index;
objfile_set_sym_fns (objfile, &elf_sym_fns_gdb_index);
else
{
/* It is ok to do this even if the stabs reader made some
partial symbols, because OBJF_PSYMTABS_READ has not been
set, and so our lazy reader function will still be called
when needed. */
objfile->sf = &elf_sym_fns_lazy_psyms;
objfile_set_sym_fns (objfile, &elf_sym_fns_lazy_psyms);
}
}
/* If the file has its own symbol tables it has no separate debug