Commit Graph

277 Commits

Author SHA1 Message Date
John Gilmore 9342ecb944 * dbxread.c: Add symbol_size to struct dbx_symfile_info.
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.
1992-06-13 06:39:27 +00:00
John Gilmore ac88ca205c Lint.
* symfile.c (add_symbol_file_command):  Initialize mapped/readnow.
1992-04-02 10:35:19 +00:00
Per Bothner 1eeba68641 Merged in latest RS6000 diffs from Metin G. Ozisik. 1992-03-29 22:33:35 +00:00
Fred Fish bf349b77fa Add OBJF_SYMS flag and use it to decide whether or not we have already
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.
1992-03-28 21:06:23 +00:00
Fred Fish 80d68b1d49 * coffread.c, mipsread.c, xcoffread.c, coffread.c, dbxread.c,
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().
1992-03-19 21:57:15 +00:00
Fred Fish b0246b3bec Changes to implement the -mapped and -readnow options for commands that
read symbol tables.
1992-03-18 16:43:25 +00:00
Fred Fish 318bf84ffe Globs of changes. See the ChangeLog for details. Most related to
using the new mmalloc package.
1992-03-15 01:09:14 +00:00
John Gilmore cba0d141fb * breakpoint.h (ALL_BREAKPOINTS_SAFE): Add.
* 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.
1992-02-27 16:28:59 +00:00
John Gilmore 3531811073 * symfile.c (symbol_file_command): strcmp => !strcmp.
* 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.
1992-02-22 10:04:50 +00:00
Stu Grossman 30875e1c4b * infrun.c, infcmd.c, breakpoint.c, main.c, symfile.c,
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
1992-02-22 09:06:58 +00:00
Per Bothner d4ea2aba3a Various fixed triggered by trying to do the right thing wrt
to external symbols in mips ecoff binaries.  See ChangeLog.
1992-01-30 03:56:32 +00:00
John Gilmore 4369a1406f * Makefile.in: VERSION 4.2.96.
* 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.
1991-12-04 08:36:17 +00:00
John Gilmore 7a6093e880 * coffread.c (coff_symfile_read): Avoid select_source_symtab,
since it is not needed and can cause errors when examining ".o"
files.

* symfile.c (compact_misc_function_vector):  Handle empty vector.
1991-12-04 03:24:36 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* param-no-tm.h:  Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h:  Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c:  Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h:  Avoid host include files in target descriptions.
* getpagesize.h:  Removed, libiberty copes now.
1991-11-21 18:42:05 +00:00
John Gilmore c9bd6710ad * mipsread.c (read_mips_symtab, read_the_mips_symtab): Use real
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.
1991-11-01 19:12:35 +00:00
John Gilmore d47d5315c8 * symfile.c (syms_from_bfd): New routine.
(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).
1991-10-26 08:02:23 +00:00
John Gilmore d8ce13268e * coffread.c (coff_symfile_read): Use xmalloc, not malloc.
* language.c, printcmd.c:  Lint.
        * language.h (get_frame_language):  Declare.
        * saber.suppress:  update.
        * stack.c (find_relative_frame):  Remove complex code that was
        #if 0'd, stick with simple code.  Lint.
	* saber.suppress:  Update a bit.
        * symfile.c (add_symbol_file_command):  Add "?" to question.
        * utils.c (parse_escape):  Avoid \a due to bdead compilers.
        * value.h:  Declare typedef_print.

        * valprint.c (val_print, type_print_base):  TYPE_CODE_RANGE less
        kludgey.
1991-09-28 01:35:29 +00:00
Stu Grossman 61a7292f6f lint 1991-08-22 22:50:50 +00:00
John Gilmore d11c44f1ee Roll in Tiemann changes for gcc -ansi. Fix assorted bugs. See ChangeLog. 1991-05-30 08:52:52 +00:00
Jim Kingdon e1ce8aa5ed The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
1991-05-02 04:28:42 +00:00
Jim Kingdon 7cc4387940 * symfile.c (fill_in_vptr_fieldno): Don't call check_stub_type.
Return void not int. (also declarations in symfile.h and value.h).
	Deal with multiple inheritance.
1991-04-26 23:00:55 +00:00
Jim Kingdon 2403f49b37 * blockframe.c, frame.h (reinit_frame_cache): New function.
solib.c (solib_add), symfile.c ({,add_}symbol_file_command):
	Use it.
1991-04-24 16:56:40 +00:00
Jim Kingdon b3fdaf3d36 * symfile.c (symbol_file_add): Add comment.
solib.c (solib_add): Don't malloc name passed to symbol_file_add.
1991-04-22 20:09:26 +00:00
Jim Kingdon e74d7b43a8 * symfile.c: Rename add_syms_command to add_symbol_file_command.
(_initialize_symfile, add_syms_addr_command):
	Rename add-syms to add-symbol-file.
1991-04-19 01:38:55 +00:00
John Gilmore 9d19971230 * symfile.c (clear_symtab_users_once, cashier_psymtab,
free_named_symtabs):  Move these routines from symmisc.c.
1991-04-19 01:09:45 +00:00
John Gilmore 0ef6f0192d Permit symbols to be superseded when new symbol files have
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.
1991-04-13 22:37:48 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00