Commit Graph

40 Commits

Author SHA1 Message Date
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 56e290f494 Cleanup discard_minimal_symbols cleanup. 2000-05-16 04:07:39 +00:00
Elena Zannoni b8fbeb1874 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
        SECT_OFF_RODATA): Define as functions of OBJFILE.  Add
        sect_index_text, sect_index_data, sect_index_rodata,
        sect_index_bss to objfile structure.
        * gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
        SECT_OFF_RODATA): Remove.
        * objfiles.c (allocate_objfile): Initialize
        sect_index_{text,data,bss,rodata} to -1, for error detection.

        * symfile.c (default_symfile_offsets): Initialize
        sect_index_{text,data,bss,rodata} from bfd information.
        * xcoffread.c (xcoff_symfile_offsets): Ditto.
        * somread.c (som_symfile_offsets): Initialize
        sect_index_{text,data,bss,rodata}.

        * coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c,
        hp-symtab-read.c, hpread.c, mdebugread.c, minsyms.c,
        mipsread.c, objfiles.c, os9kread.c, pa64solib.c, partial-stab.h,
        remote-os9k.c, remote-vx.c, remote.c, rs6000-nat.c, somsolib.c,
        stabsread.c, symfile.c, xcoffread.c:
        Update use of SECT_OFF_{TEXT,DATA,BSS,RODATA} to depend on the
        current objfile.

        * xcoffread.c: Add new field objfile to find_targ_sec_arg.
2000-05-04 16:52:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Jason Molenda ad3b8c4a1a 1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
        possible nested-if confusion.
        * breakpoint.c (breakpoint_here_p): Ditto.
        (breakpoint_inserted_here_p): Ditto.
        (breakpoint_thread_match): Ditto.

        * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
        * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
        prototypes.

        * symtab.h: Add prototype for _initialize_source.
        * value.h: Add prototype for _initialize_value.

        * defs.h: Include sys/types.h or stddef.h to get size_t.
        (make_cleanup): Add make_cleanup_func typedef and switch to using
        a prototype for this function.
        (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
        using mmalloc.

        * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
        dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
        infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
        symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
        Cast parameters passed to make_cleanup to use the new
        make_cleanup_func typedef.


More warning cleanups.  There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system.  Bwahahaha.  You can see them
like this:

grep make_cleanup\  * | grep -v make_cleanup_func

I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
1998-10-14 01:15:00 +00:00
Stan Shebs d7d7dd1b5a More avoidance of writing documentation in the internals manual.
* dbxread.c (IGNORE_SYMBOL): Remove definition, is never used.
	* os9kread.c: Remove comment mentioning IGNORE_SYMBOL.
1998-09-10 02:58:19 +00:00
Jason Molenda 74d6ac44de Thu Apr 23 12:27:43 1998 Philippe De Muyter <phdm@macqel.be>
* symfile.c (simple_overlay_update_1): Do not prefix array address
        by `&'.
        * bcache.h (BCACHE_DATA_ALIGNMENT): Ditto.
        * tracepoint.c (encode_actions): Ditto.
        * language.c, complaints.c, utils.c (varargs.h): Do not include that
        file here, it is already included indirectly by defs.h.
        * dbxread.c (dbx_symfile_init, process_one_symbol): Cast xmalloc return
        value to the appropriate pointer type.
        * utils.c (floatformat_from_doublest): Ditto.
        * tracepoint.c (read_actions, _initialize_tracepoint): Ditto.
        (add_memrange): Likewise with xrealloc return value.
        * stabsread.c (ref_add): Ditto.
        * coffread.c (coff_symfile_init): Likewise for xmmalloc return value.
        * elfread.c (elf_symfile_read): Ditto.
        * os9kread.c (os9k_symfile_init): Ditto.
1998-04-23 19:31:51 +00:00
Andrew Cagney 4dbdbfc4d3 o Fix code deleting psymtab entry from objfile's list.
Only worked if the first element in the list was
	being deleted.
o	When MAINLINE (reading main objectfile and need to
	clear out old data), change elfread.c so that the
	psymbol table is emptied once (in elf_symfile_read)
	instead of multiple times in each *_read_psymtab
	function.
o	For elf_symfile_read, load dwarf2 symbols last
	(so that they are searched for first).
o	In mdebug_psymtab_read, delete check to see if
	symbols for current source file already loaded.
	Test doesn't work for .h files.  Above change
	works better
1997-12-17 16:50:18 +00:00
Fred Fish 609fd03384 * buildsym.h (struct subfile): Add debugformat member.
(record_debugformat): Declare global function.
	* buildsym.c (start_subfile): Initialize debugformat member
	to NULL.
	(record_debugformat): New function to record the format.
	(end_symtab): Copy format into symtab debugformat member.
	(end_symtab): Free subfile debugformat member.
	* symmisc.c (free_symtab): Free debugformat when freeing
	symtab.
	* symfile.c (allocate_symtab): Initialize the new debugformat
	member for new symtabs.
	* symtab.h (struct symtab): Add debugformat member.
	* source.c (source_info): Print the debug format.

	* os9kread.c (os9k_process_one_symbol): Call record_debugformat
	with "OS9".
	* hpread.c (hpread_expand_symtab): Call record_debugformat
	with "HP".
	(hpread_process_one_debug_symbol): Ditto.
	* dbxread.c (process_one_symbol): Call record_debugformat
	with "stabs".
	* coffread.c (coff_start_symtab): Call record_debugformat
	with "COFF".
	* xcoffread.c (read_xcoff_symtab): Call record_debugformat
	with "XCOFF".
	* dwarfread.c (read_file_scope): Call record_debugformat
	with "DWARF 1".
	* dwarf2read.c (read_file_scope): Call record_debugformat
	with "DWARF 2".
	* dstread.c (dst_end_symtab): Set debugformat to be
	"Apollo DST".
	* mdebugread.c (new_symtab): Set debugformat to be "ECOFF".
1997-06-28 06:10:06 +00:00
Fred Fish a7f56d5aff Just some cleanups noticed while working on PR 10760
* dbxread.c (dbx_symfile_read): Call free_pending_blocks rather
	than poking global variable (which is now static).
	* hpread.c (hpread_build_psymtabs): Ditto.
	* os9kread.c (os9k_symfile_read): Ditto.
	* xcoffread.c (xcoff_initial_scan): Ditto.

	* buildsym.h (free_pending_blocks): Declare here.
	(pending_blocks): Remove declaration of global symbol.
	(free_pendings): Remove declaration of global symbol.
	(make_blockvector): Declare here.
	(record_pending_block): Declare here.

	* dstread.c (make_blockvector): Remove static copy that was old
	clone of version in buildsym.c.
	(process_dst_block): Call record_pending_block rather than doing
	it by hand.
	(read_dst_symtab): Ditto.

	* buildsym.c (make_blockvector): Make global rather than static,
	(record_pending_block): New function, code moved from finish_block.
	(finish_block): Use record_pending_block.
	(free_pending_blocks): New function.
	(really_free_pendings): Call free_pending_blocks.
	(pending_blocks): Make static instead of global.
	(free_pendings): Make static instead of global.
1996-10-08 19:00:38 +00:00
Stu Grossman 9e77e83d30 * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
mdebugread.c os9kread.c source.c top.c utils.c:  Don't
	include param.h or sys/file.h (or unistd.h in some cases).
	* defs.h exec.c inflow.c remote-array.c remote-e7000.c
	sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
	__WIN32__, WINGDB, WIN32, etc... with _WIN32.
	* main.c:  Remove #ifndef WINGDB around option processing.  Fix
	bug with passing argc==0 and argv==NULL to getopt.
	* (main) Remove calls to access() before source_command.  Let
	soure_command handle access errors.
	* maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
	* symtab.c (operator_chars):  Make this global for wingdb.
	* top.c (disconnect):  #ifdef out for _WIN32.
	* (source_command):  If got an error and from_tty, then call print
	error, else just return quietly.
	* utils.c (fatal_dump_core):  Can't kill ourselves under windows.
	Just exit.
	* (pollquit notice_quit):  #ifdef out stuff that doesn't exist
	under windows.
1996-08-08 02:50:22 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Fred Fish ace4b8d75a (laying some groundwork for a fix for PR 8443)
* coffread.c (record_minimal_symbol): Don't presave name string
	on symbol_obstack before passing to prim_record_minimal_symbol.
	It now handles saving the string itself.
	* dbxread.c (read_dbx_dynamic_symtab): Ditto.
	* mipsread.c (read_alphacoff_dynamic_symtab): Ditto.
	* os9kread.c (record_minimal_symbol): Ditto.
	* solib.c (solib_add_common_symbols): Ditto.

	* coffread.c (coff_symtab_read): Don't presave name string on
	symbol_obstack before passing to prim_record_minimal_symbol_and_info.
	It now handles saving the string itself.
	* dbxread.c (record_minimal_symbol): Ditto.
	* elfread.c (record_minimal_symbol_and_info): Ditto.

	* dstread.c (record_minimal_symbol): Remove static function that just
	called prim_record_minimal_symbol with the same args (after change to
 	prim_record_minimal_symbol to do it's own name string saves).
	* nlmread.c (record_minimal_symbol): Ditto.
	* somread.c (record_minimal_symbol): Ditto.

	* hpread.c (hpread_read_enum_type): Save symbol name on symbol obstack.
	(hpread_read_function_type): Ditto.
	(hpread_process_one_debug_symbol): Ditto.
	* mdebugread.c (parse_symbol): Ditto.
	(new_symbol): Ditto.
	* minsyms.c (prim_record_minimal_symbol_and_info): Ditto.

	* coffread.c (process_coff_symbol): Use obsavestring to save
	SYMBOL_NAME, rather than obstack_copy0.
	* dstread.c (create_new_symbol): Ditto
	* symfile.c (obconcat): Ditto.
	* stabsread.c (patch_block_stabs): Ditto.
	* xcoffread.c (SYMNAME_ALLOC): Ditto.

	* symfile.c (obsavestring): Update comments
	* solib.c (solib_add_common_symbols): Remove local var origname.
1996-07-08 09:05:18 +00:00
Mark Alexander e74acce48c * coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c,
os9kread.c: Replace identical sym_offsets functions with
	default_symfile_offsets.
	* somread.c (som_symfile_offsets): Use new SIZEOF_SECTION_OFFSETS
	macro to allocate section_offsets.
	* symfile.c (default_symfile_offsets): New function.
	* symfile.h: Declare default_symfile_offsets.
	* symtab.h: Define SIZEOF_SECTION_OFFSETS macro to
	simplify allocation of section_offsets.
1996-07-03 05:11:40 +00:00
Fred Fish eae8aa302e * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and
	use it, rather than calling add_psymbol_addr_to_list.
	(add_psymbol_addr_to_list): Delete.
	(add_psymbol_to_list): Make psymbol static to avoid random data in
	gaps due to alignment of structure members.
	* symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST,
 	ADD_PSYMBOL_ADDR_TO_LIST): Remove.  Real world tests show no
	performance improvements by inlining via complicated macros and
	they just make gdb larger and harder to maintain.
	* dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST
	and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to
	add_psymbol_to_list with appropriate long or CORE_ADDR args.
	(add_partial_symbol): Ditto.
	* partial-stab.h: Ditto.
	* os9kread.c (read_os9k_psymtab): Ditto
	* mdebugread.c (parse_partial_symbols): Ditto.
	(handle_psymbol_enumerators): Ditto.
	(demangle.h): Include.
	* hpread.c (hpread_build_psymtabs): Ditto.
	(hpread_build_psymtabs): Ditto.
	(demangle.h): Include
1996-04-06 10:19:19 +00:00
Fred Fish 4cfb23a94c * os9kread.c (os9k_process_one_symbol): Note nonportable
assumption that an int can hold a char *.

	* bcache.h (struct hashlink): Wrap data[] inside union with
	double to force longest alignment.
	(BCACHE_DATA): New macro to access data[].
	(BCACHE_ALIGNMENT): New macro to get offset to data[].
	* bcache.c (lookup_cache, bcache): Use BCACHE_DATA to get
 	address of cached data.  Use BCACHE_ALIGNMENT to compute
	amount of space to allocate for each hashlink struct.
1996-03-24 00:22:50 +00:00
Fred Fish 2ad5709f00 * bcache.c, bcache.h: New files to implement a byte cache.
* Makefile.in (SFILES): Add bcache.c.
	(symtab_h): Add bcache.h.
	(HFILES_NO_SRCDIR): add bcache.h
	(COMMON_OBJS): Add bcache.o
	(bcache.o): New target.
	* dbxread.c (start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
	* hpread.c (hpread_start_symtab):  Ditto.
	* os9kread.c (os9k_start_psymtab):  Ditto.
	* stabsread.h (start_psymtab):  Ditto.
	* {symfile.c, symfile.h} (start_psymtab_common):  Ditto.
	* maint.c (maintenance_print_statistics): Call
 	print_symbol_bcache_statistics.
	* objfiles.c (allocate_objfile): Initialize psymbol bcache malloc
	and free pointers.
	* solib.c (allocate_rt_common_objfile): Ditto.
	* symfile.c (reread_symbols):  Ditto.
	(free_objfile): Free psymbol bcache when objfile is freed.
	(objfile_relocate): Use new indirect psymbol pointers.
	* objfiles.h (struct objfile): Add psymbol cache.
	* symfile.c (compare_psymbols): Now passed pointers to pointers to
	psymbols.
	(reread_symbols): Free psymbol bcache when freeing other objfile
	resources.
	(add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new
	psymbol using the psymbol bcache.
	(init_psymbol_list): Psymbol lists now contain pointers rather than
	the actual psymbols.
	* symfile.h (psymbol_allocation_list): Psymbol lists now dynamically
	grown arrays of pointers.
	(ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol
	bcache.
	* symmisc.c (print_partial_symbols): Now takes pointer to pointer
	to partial symbol.
	(print_symbol_bcache_statistics): New function to print per objfile
 	bcache statistics.
	(print_partial_symbol, print_partial_symbols,
 	maintenance_check_symtabs, extend_psymbol_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2,
	make_symbol_completion_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.h (bcache.h): Include.
	* xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
1996-02-16 22:14:47 +00:00
Jeff Law 436d414327 * buildsym.c (end_symtab): Remove sort_pending and sort_linevec
arguments.  Sorting is now dependent on OBJF_REORDERED.  All
        callers/references changed.
        * dbxread.c (read_ofile_symtab): Correctly determine value for
        last_source_start_addr for reordered executables.
        (process_one_symbol): Handle N_FUN with no name as an end of
        function marker.
        * partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE
        is the high text address for a psymtab.
        (case N_SO): Likewise.
        (case N_FUN): Handle N_FUN with no name as an end of function
        marker.
        * minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols
        at the same address rather than a random subset of them.
        * coffread.c (coff_symfile_init): Set OBJF_REORDERED.
        * elfread.c (elf_symfile_init): Similarly.
        * somread.c (som_symfile_init): Similarly.
        * xcoffread.c (xcoff_symfile_init): Similarly.

Support for debugging reordered executables.  Remaining mentor vm
changes.
1996-01-08 17:55:25 +00:00
Fred Fish 2dd30c722b * defs.h: Delete extraneous whitespace at end of file.
* symfile.h: Move #include of demangle.h outside conditional.
	* objfiles.h (struct objstats, OBJSTAT, OBJSTATS): New struct
	and macros to hold per-objfile statistics for internal instrumentation.
	(struct objfile): Add OBJSTATS member, which is optional.
	* buildsym.h (next_symbol_text_func): Now takes objfile argument.
	Also update copyright to 1995.
	* dbxread.c (dbx_next_symbol_text): Now takes objfile argument.
	(dbx_symfile_init, coffstab_build_psymtabs, elfstab_build_psymtabs,
	stabsect_build_psymtabs): Accumulate string table size.
	(dbx_next_symbol_text, read_dbx_symtab, read_ofile_symtab):
	Accumulate number of stabs symbols read.
	* dwarfread.c (new_symbol, symthesize_typedef):
	Accumulate number of full symbols created.
	* gdbtypes.c (alloc_type): Accumulate number of types.
	* maint.c (maintenance_print_statistics): New function.
	* mdebugread.c (mdebug_next_symbol_text): Now takes objfile argument.
	* minsyms.c (prim_record_minimal_symbol_and_info): Accumulate
	number of minimal symbols read.
	* os9kread.c (read_os9k_psymtab): next_symbol_text takes objfile arg.
	* partial-stab.h: next_symbol_text takes objfile arg.
	* stabsread.c (error_type, STABS_CONTINUE): Now takes objfile arg and
 	uses it to call next_symbol_text.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	Accumulate number of partial symbols created.
	* symfile.h (ADD_PSYMBOL_VT_TO_LIST): Accumulate number of partial
	symbols created.
	* symmisc.c (print_objfile_statistics): Print the per-objfile
	internal instrumentation statistics gathered.
	* xcoffread.c (xcoff_next_symbol_text): Now takes objfile argument.
1995-12-21 04:08:27 +00:00
Fred Fish f309ad9590 * coffread.c, dbxread.c, dstread.c, objfiles.c, os9kread.c,
symfile.c, symtab.c:  Use "obstack.h" rather than <obstack.h>.
1995-12-09 05:12:46 +00:00
Stan Shebs 9e4c931641 * defs.h (SEEK_SET, SEEK_CUR): Add default definitions.
* dbxread.c, mdebugread.c, os9kread.c (SEEK_SET, SEEK_CUR):
	Remove default definitions.
1995-10-20 01:43:31 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Ian Lance Taylor f779e99f2a * stabsread.h (struct stab_section_list): Define.
(coffstab_build_psymtabs): Remove staboff and stabsize parameters.
	Add textaddr, textsize, and stabs parameters.
	* gdb-stabs.h (struct dbx_symfile_info): Remove text_sect field.
	Add text_addr and text_size fields.
	(DBX_TEXT_SECT): Don't define.
	(DBX_TEXT_ADDR, DBX_TEXT_SIZE): Define.
	* coffread.c: Include <ctype.h>.
	(struct coff_symfile_info): Remove stabsect and stabindexsect
	fields.  Add textaddr, textsize, and stabsects fields.
	(coff_locate_sections): Record the address of the .text section,
	and total the sizes of all sections with names beginning with
	".text".  Don't bother to record a .stab.index section (COFF
	doesn't use them).  Make a linked list of all sections with names
	beginning with ".stab".
	(coff_symfile_read): Adjust call to coffstab_build_psymtabs for
	new parameters.
	* dbxread.c (dbx_symfile_read): Use DBX_TEXT_ADDR and
	DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT.
	(dbx_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not
	DBX_TEXT_SECT.
	(elfstab_build_psymtabs): Likewise.
	(stabsect_build_psymtabs): Likewise.
	(symbuf_sections, symbuf_left, symbuf_read): New static variables.
	(fill_symbuf): If symbuf_sections is not NULL, read symbols from
	multiple sections.
	(coffstab_build_psymtabs): Remove staboffset and stabsize
	parameters.  Add textaddr, textsize, and stabsects parameters.
	Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not DBX_TEXT_SECT.  Handle
	multiple stabs sections.
	* os9kread.c (os9k_symfile_read):  Use DBX_TEXT_ADDR and
	DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT.
	(os9k_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not
	DBX_TEXT_SECT.
PR 7241.
1995-07-17 17:33:37 +00:00
Jim Kingdon a367db8959 * rs6000-tdep.c (find_toc_address): Revise comment.
* symfile.c, symfile.h (init_psymbol_list): New function;
	consolidate duplicated copies from os9kread.c, dbxread.c
	and dwarfread.c.
	* defs.h: Declare info_verbose.
	* xcoffread.c: Extensive changes to support psymtabs.
1995-05-13 20:39:21 +00:00
Jim Kingdon 2d336b1b51 * config/sparc/tm-sun4sol2.h, dbxread.c: Rename
N_SO_ADDRESS_MAYBE_MISSING to SOFUN_ADDRESS_MAYBE_MISSING.
	* symtab.h (minimal_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Add
	filename field.
	* elfread.c (record_minimal_symbol_and_info),
	minsyms.c, symtab.h (prim_record_minimal_symbol_and_info): Return
	newly created symbol.
	* elfread.c (elf_symtab_read) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Set filename field of minimal symbol.
	* symmisc.c (dump_msymbols) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Print filename field.
	* minsyms.c, symtab.h (lookup_minimal_symbol): New arg sfile.
	* symm-tdep.c, somsolib.c, hppa-tdep.c, c-exp.y, f-exp.y,
	m2-exp.y, nindy-tdep.c, m3-nat.c, irix5-nat.c, hpread.c,
	os9kread.c, breakpoint.c, alpha-tdep.c, valops.c, symtab.c,
	printcmd.c, dbxread.c: Change callers to pass NULL for sfile.
	* dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Find address of function from minimal symbols.
	* partial-stab.h, case 'f', 'F': Call find_stab_function_addr
	instead of getting pst->textlow from the stab.
	* minsyms.c (find_stab_function_addr): New function.
1995-02-09 07:00:45 +00:00
Stan Shebs 356ff909bd * defs.h (bfd_read, bfd_seek): Remove declarations.
* os9kread.c, rs6000-nat.c (libbfd.h): Don't include.
1994-08-02 20:27:44 +00:00
Peter Schauer cef0333efd * dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
Move "no debugging symbols found" test to symfile.c.
	* symfile.c (syms_from_objfile, reread_symbols):  Add
	"no debugging symbols found" test.
	* coffread.c (init_stringtab):  Handle stripped files with a
	stringtab offset of zero gracefully.
	* osfsolib.c (solib_create_inferior_hook):  Use DYNAMIC flag from
	BFD instead of stop_pc heuristic to determine if it is a dynamically
	linked object file.
	* procfs.c (wait_fd):  Handle ENOENT error return from PIOCWSTOP
	ioctl, it indicates that the process has exited.
1994-07-06 08:01:52 +00:00
Jim Kingdon 1c95d7ab2e gcc -Wall lint:
* breakpoint.c (watchpoint_check): Remove unused variable b.
	* stack.c (print_frame_info): Move sp and buf inside #if.
	* eval.c (evaluate_subexp): Remove unused variables pp,
	mangle_ptr, ptr, and mangle_tstr.
	* valarith.c (value_x_binop): Remove unused variables mangle_tstr
	and mangle_ptr.
	* symtab.c (lookup_symtab): Put variable copy inside #if.
	(decode_line_1): Put variable q1 inside #if 0.
	* target.h: Declare target_link.
	* infrun.c (wait_for_inferior): Remove unused variables signame.
	* remote.c (remote_resume): Remove unused variable name.
	* c-exp.y (parse_number): Parenthesize operand of shift.
	* dbxread.c (record_minimal_symbol): Parenthesize operand of &&
	(this is a semantic change, the warning seems to have detected a bug).
	* dbxread.c (end_psymtab): Move variable p1 inside #if.
	* coffread.c: Move variable temptype inside #if.
	* ch-typeprint.c (chill_type_print_base): Remove unused variable
	name.
	* ch-valprint.c: #include typeprint.h and ch-lang.h.
	(chill_val_print): Remove unused variable in_range.
	(chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
	(chill_val_print): Add default case for switch.
	* stabsread.h: Declare stabsect_build_psymtabs.
	* os9kread.c (read_minimal_symbols): Make this return void.
	(os9k_symfile_read): Remove unused variables stb_exist and val.
	(os9k_symfile_init): Remove unused variable val.
	(fill_sym): Remove unused variable id.
	(read_os9k_psymtab): Put variable back_to inside #if 0.  Remove
	unused variable nsl.
	Remove unused variable symfile_bfd.
	#if 0 unused variables lbrac_unmatched_complaint and
	lbrac_mismatch_complaint.
	Remove declaration for non-existent function os9k_next_symbol_text.

	* annotate.c, annotate.h: New files, containing a function for
	each annotation which outputs it.
	* Move breakpoints_changed from breakpoint.c to annotate.c.
	* breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
	printcmd.c, source.c, stack.c, utils.c, valprint.c:
	Use annotate.c functions to output annotations.
	* Makefile.in (OBS): Add annotate.o.
1994-05-13 18:18:57 +00:00
Kung Hsu d5336fc5a4 Modified Files:
ChangeLog remote-os9k.c os9kread.c stabsread.c

        * remote-os9k.c (rombug_fetch_registers): set trace mode
        correctly.
        * remote-os9k.c (rombug_read_inferior_memory): cache data in
        buffer.
        * os9kread,c (read_os9k_psymtab): process file symbol to truncate
        extra info.
        * os9kread.c (os9k_read_ofile_symtab): proper casting of args
        passed to process_one_symbol.
        * stabsread.c (read_type): process os9k functio prototype.
1994-04-22 21:36:59 +00:00
Kung Hsu d80ff70c10 Modified Files:
ChangeLog os9kread.c remote-os9k.c

        * os9kread.c (record_minmal_symbol): add section_offset to
        relocate minimal symbol table.
        * os9kread.c (read_minimal_symbols): ditto.
        * os9kread.c (os9k_symfile_init): increase size of dbg and stb
        file names.
        * os9kread.c (read_os9k_psymtab): if there's no dbg file, just
        return. Also if file addr is 0 leave it 0, not to relocate.
        * remote-os9k.c (_initialize_remote_os9k): add 'set remotexon',
        'set remotexoff' and 'set remotelog' commands.
1994-03-30 00:18:29 +00:00
Kung Hsu d9389f37d5 Modified Files:
ChangeLog os9kread.c stabsread.c remote-os9k.c symfile.c
	target.c

        * os9kread.c (fill_sym): check compiler verion number for pre-
        UltraC compiler.
        * os9kread.c (os9k_process_one_symbol): address of symbol is
        relative to section not module.
        * stabsread.c (define_symbol): add symbol type 's' as local
        symbol for os9k.
        * remote-os9k.c: add command 'set monitor_log' to turn on or off
        monitor logging.
        * remote-os9k.c: fix bug in delete breakpoint, single step trace.
        * remote-os9k.c: fix bug in 'set remotebaud' function.
        * remote-os9k.c (rombug_link): minimize checking so to improve
        speed.
        * symfile.c (symfile_command): check if failed to link, also make
        the command be able to accept more than one filenames.
        * target.c (target_link): check if failed to link with rombug.
1994-03-10 03:13:52 +00:00
Jim Kingdon 25200748a2 * os9kread.c (os9k_process_one_symbol): Rename
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
	* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
	(CORE_ADDR)0, from target_link, since that is what it uses.
	Process name at end, not during parsing (like we did before Kung's
	change), so that -readnow and -mapped can appear anywhere.
	Make text_relocation a local variable.
	* config/i386/i386os9k.mt: Fix comment.
	* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
	* os9kread.c: Put "comments" after #endif inside /* */.
	* stabsread.h: Add os9k_stabs variable.
	* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
	Set it.
	* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
	descriptor in global_symbols not local_symbols.
	(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
	descriptors.
	(read_type): If os9k_stabs, accept function parameters after 'f'
	type descriptor.
	(read_array_type): If os9k_stabs, don't expect index type and
	expect lower and upper to be separated by ',' not ';'.
	(read_enum_type): If os9k_stabs, read a number before the first
	enumeration constant.
	(os9k_init_type_vector): New function.
	(dbx_lookup_type): Call it when starting new type vector.
	* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
	* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
	* os9kstab.c: Removed.
	* Makefile.in: Update accordingly.
	* objfiles.c (objfile_relocate_data): Removed.
	* remote-os9k.c (rombug_wait): Call objfile_relocate
	not objfile_relocate_data.
	* objfiles.h, objfiles.c: Remove find_pc_objfile.
	* remote-os9k.c (rombug_wait): Call find_pc_section not
	find_pc_objfile.
	* main.c (quit_command): Check inferior_pid; revert Kung change.
	* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
1994-03-02 03:01:34 +00:00
Kung Hsu 1340861c99 Modified Files:
ChangeLog objfiles.c objfiles.h symfile.c target.c main.c
	Makefile.in configure.in
Added Files:
	os9kread.c os9kstab.c remote-os9k.c

        * os9kread.c: New file to read os9000 style symbo table.
        * os9kstab.c: new file to read os9000 style stabs.
        * remote-os9k.c: remote protocol talking to os9000 rombug monitor.
        * objfiles.c (find_pc_objfile): new function to search objfile
        from pc.
        * objfiles.c (objfile_relocate_data): new function to relocate
        data symbols in symbol table.
        * objfiles.h: Add two aux fields in struct objfile to handle
        multiple symbol table files situation like in os9000.
        * symfile.c: Change so 'symbol-file' command can handle multiple
        files. Also call target_link() to get relocation infos.
        * target.c (target_link): new function to get relocation info when
        a symbol file is requested to load.
        * main.c (quit_command): take out 'inferior_pid != 0' condition,
        because in cross mode there's no inferior pid, bit they need to
        be detached.
        Makefile.in: add os9kread.c os9kstab.c and .o's.
        configure.in: add i386os9k target.
        config/i386/i386os9k.mt: new add.
        config/i386/tm-i386os9k.h: new add.
1994-03-01 23:13:56 +00:00