extra info in the minimal symbol.
(elf_symtab_read): The extra info is the size of an ELF object,
which was kludged to us in the `udata' field of the BFD symbol.
Gag me with a crowbar...
(elf_symfile_read): Keep track of both the absolute load address,
and the offset between load addr and symbols. Handle STABS as
well as DWARF sections, passing the absolute load address to
elfstab_build_psymtabs.
* objfiles.c (free_objfile): Eliminate storage leaks. Contributed
by <Peter.Schauer@regent.e-technik.tu-muenchen.dbp.de>.
* symfile.c (symfile_bfd_open): Comment where name is freed.
* symmisc.c (extend_psymbol_list): Comment where list is freed.
Add symbol_size and file offsets to struct symloc.
Add static symbol_table_offset, string_table_offset,
file_string_table_offset, next_file_string_table_offset,
last_function_name.
(add_old_header_file): Convert error() to complain()t.
(dbx_symfile_read): Get symbol size via the objfile.
Also get symbol_table_offset.
(dbx_symfile_init): Record symbol size and count via the objfile.
(dbx_next_symbol_text): Always add file_string_table_offset when
accessing string table.
(read_dbx_symtab): Initialize file_string_table_offset to 0.
(SET_NAMESTRING): Use the offset.
(end_psymtab): Large kludge to determine addresses where source
files start and end (for the psymtab header).
(psymtab_to_symtab_1): Set file_string_table_offset before reading.
Get this, symbol size, and symbol offset, from psymtab.
(read_ofile_symtab): Don't back up one symbol for Solaris2.
Patch up last_source_start_addr if zero in N_SO.
(process_one_symbol): Add variable function_start_offset.
( "", N_FUN, N_LBRAC, N_RBRAC, N_SLINE): Add ifdef for
BLOCK_ADDRESS_FUNCTION_RELATIVE.
( "", N_OBJ, N_OPT): Ignore.
(elfstab_build_psymtabs): New function to read stabs out of
an ELF file.
* Makefile.in: Accept $(BISON) even though we really want $(YACC).
(gdb): use GLOBAL_CFLAGS when linking, too.
* partial-stab.h (N_UNDF): Deal with Sol2 relative stringtab offsets.
(N_OBJ, N_OPT): Ignore.
('f', 'F'): Save last function name.
* symfile.h: Prototype elfstab_build_psymtabs.
* symfile.c: Add almost-OK debug versions of add_psymbol_*to_list.
* xm-sysv4.h: Add <limits.h> to avoid conflicting defns in defs.h.
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.