tried to read symbols from a file, for mapped objfiles. This fixes a
memory leak (actually a constant memory growth) due to reading symbol
files with no debug info and thus generating no psymtabs or symtabs.
Most typically happened with shared libraries.
elfread.c (coff_symfile_finish): Add function, prototype, and
add to the xxxx_sym_fns struct for each file type. Also reformat
the xxxx_sym_fns vector to a standard format and add comments.
* coffread.c, mipsread.c, xcoffread.c, coffread.c, dbxread.c,
elfread.c (xxx_symfile_new_init, xxx_symfile_init, xxx_symfile_read):
Pass pointer to struct objfile rather than pointer to sym_fns.
Change references inside each function accordingly. Allocate any
symbol file specific info in the per-objfile memory region.
* dbxread.c (free_and_init_header_files): Break function into
free_header_files(), called from dbx_symfile_finish(), and
init_header_files(), called from dbx_new_init().
* dbxread.c (dbx_new_init): Move deallocation things to new
dbx_symfile_finish function.
* elfread.c (elf_new_init): Call buildsym_new_init().
* objfiles.c (free_objfile): Call the appropriate symfile_finish()
routine for the objfile before deallocating other stuff.
* sparc-tdep.c (get_longjmp_target): Cast target_read_memory arg.
* symfile.h: Move struct sym_fns to before struct objfile def.
Add sym_finish function pointer and change prototypes of other
function pointers to reflect passing struct objfile pointer rather
than struct sym_fns pointer.
* symfile.c: Remove now obsolete symtab_fns pointer.
* symfile.c (symfile_init): Renamed to find_sym_fns, and now only
locates the correct sym_fns struct for the given objfile.
* symfile.c (syms_from_objfile, symbol_file_add): Restructured
for better support of mapped symbol tables.
* symfile.c (symbol_file_command): Remove obsolete code using
symfile_fns.
* symfile.h: Remove duplicate declarations for symfile_objfile,
entry_point, and object_files.
* target.c (target_info): Compare symfile_objfile to NULL.
* xcoffread.c (aixcoff_new_init): Move deallocation stuff to
aixcoff_symfile_finish().
* breakpoint.c (breakpoint_re_set): Use ALL_BREAKPOINTS_SAFE.
* symtab.c (find_pc_symtab): Handle having no objfiles.
* infcmd.c: Fix comment.
* objfiles.c (free_all_objfiles): Add.
* symfile.h (ALL_OBJFILES, ALL_OBJFILES_SAFE): Add.
* symfile.c (symbol_file_command): free all objfiles when
specifying a new symbol file.
(reread_symbols): Stat the file name, don't fstat the descriptor.
* breakpoint.h: Move prototypes to follow enum definition they need.
* breakpoint.c, infrun.c: Lint.
* printcmd.c: Use `enum enable' rather than `enum
display_status'.
* mipsread.c: First pass at making it compile with the new
objfile changes. Probably seriously broken still, but it
compiles. FIXME.
breakpoint.h, tm-sun4os4.h, tm-sparc.h, sparc-tdep.c, tm-mips.h,
mips-tdep.h, tm-sun3.h, tm-68k.h, m68k-tdep.h: Add support for
stepping (and nexting) through longjmp(). Also, cleanup
breakpoint handling quite a bit by creating explicit breakpoint
types instead of using magic breakpoint numbers.
Makefile.in: Update version to 4.4.3
* main.c (initialize_main): Revise command descriptions.
* command.c (show_user): `info user' -> `show user'.
* symtab.c (_initialize_symtab): Typo in `info types' desc.
* coffread.c (coff_symfile_read): Avoid select_source_symtab,
since it is not needed and can cause errors when examining ".o"s.
(read_coff_symtab, decode_base_type): Use complain, not printf.
Print symbol name, not its number.
Remove "#if defined(clipper) #define BELIEVE_PCC_PROMOTION", which
someday should go in a clipper target config file.
* symfile.c (compact_misc_function_vector): Handle empty vector.
(complain, clear_complaints, syms_from_objfile): Fix complaint
formatting.
* xcoffexec.c: Change syms_from_objfile caller.
filename with error messages.
* stack.c (frame_select_command): Rename to select_frame_command
to avoid "fr" and "fra" having nonunique completions.
* symfile.c (sort_symtab_syms): Ignore sort of zero symtab *.
(symfile_init): Print file format name when unable to handle it.
(free_named_symtabs): Use BLOCKVECTOR rather than obsolete BLOCKLIST.
* symmisc.c (free_symtab): Only free linetable if nonzero.
* symtab.h: Remove obsolete BLOCKLIST macros.
(add_symbol_file): Call it to do the real work.
(syms_from_bfd): Initialize entry_point before calling symfile_init.
* symtab.h, symfile.c, coffread.c, mipsread.c, dwarfread.c:
Avoid declaring or setting entry_point (symfile.h & symfile.c cope).
been read in, particularly for VxWorks.
* symfile.c (symbol_file_add): Use filtered printing and wrap it.
If we have wiped out any old symbol tables, clean up at end of
symbol reading.
(symbol_file_command): Don't reference symfile_fns if it's zero.