Commit Graph

343 Commits

Author SHA1 Message Date
Andrew Cagney 7be0c53637 2003-11-05 Andrew Cagney <cagney@redhat.com>
* xcoffread.c (find_linenos): Replace "sec_ptr" and "bfd" with
	"struct bfd_section" and "struct bfd".
	* target.h (struct section_table): Ditto.
	* rs6000-nat.c (xcoff_relocate_core): Ditto.
	* solib-svr4.c (elf_locate_base): Ditto.
	* pa64solib.c (dld_cache_t): Ditto.
	* objfiles.h (struct obj_section): Ditto.
	* objfiles.c (add_to_objfile_sections): Ditto.
	* exec.c (bfdsec_to_vmap): Ditto.
	(add_to_section_table): Ditto.
	(build_section_table): Ditto.
	* corelow.c (get_core_register_section): Ditto.
	* coffread.c (find_linenos): Ditto.
	* elfread.c (elf_interpreter): Delete #if0'd function.

	* mips-tdep.c (mips_dump_tdep): Delete code prinint VX_NUM_REGS.
	* config/sparc/tm-vxsparc.h (VX_NUM_REGS): Delete macro.
	* config/mips/tm-vxmips.h (VX_NUM_REGS): Delete macro.
	* config/m68k/tm-vx68.h (VX_NUM_REGS): Delete macro.

	* arch-utils.h (generic_cannot_extract_struct_value_address):
	Delete declaration.
	* wince.c (_initialize_wince): Fix multi-line string.
	* ia64-tdep.c (floatformat_valid): Convert to ISO C.
2003-11-06 02:52:28 +00:00
Elena Zannoni 29e0a0623d 2003-11-05 Elena Zannoni <ezannoni@redhat.com>
* coffread.c (coff_symtab_read): Remove passing of info parameter
       to prim_record_minimal_symbol_and_info.
2003-11-05 15:30:35 +00:00
Elena Zannoni 8af580fccd 2003-11-05 Elena Zannoni <ezannoni@redhat.com>
* coffread.c (process_coff_symbol): Delete CXUX_TARGET macro use.
       (decode_base_type): Delete ifdeffed out code.
2003-11-05 15:27:31 +00:00
Andrew Cagney deafb06122 2003-09-20 Andrew Cagney <cagney@redhat.com>
* breakpoint.c: Eliminate ARGSUSED.
	* buildsym.c, cli/cli-cmds.c, cli/cli-script.c: Ditto.
	* coffread.c, corelow.c, dwarf2read.c, event-top.c: Ditto.
	* exec.c, gcore.c, hpux-thread.c, infcmd.c, inflow.c: Ditto.
	* infrun.c, inftarg.c, maint.c, ocd.c, printcmd.c: Ditto.
	* procfs.c, regcache.c, remote-rdi.c, remote-sds.c: Ditto.
	* remote.c, sol-thread.c, source.c, stabsread.c: Ditto.
	* stack.c, symfile.c, target.c, top.c, typeprint.c: Ditto.
	* utils.c, v850ice.c, valprint.c, values.c, win32-nat.c: Ditto.
	* wince.c, remote-vx.c: Ditto.
2003-09-21 01:26:46 +00:00
Andrew Cagney aa1ee363bc 2003-09-16 Andrew Cagney <cagney@redhat.com>
* buildsym.c: Remove more occurances of "register".
	* coffread.c, dbxread.c, dcache.c, dwarf2read.c: Ditto.
	* environ.c, eval.c, f-valprint.c, findvar.c: Ditto.
	* gdbtypes.c, gnu-v2-abi.c, h8300-tdep.c, hppa-tdep.c: Ditto.
	* infcmd.c, mdebugread.c, minsyms.c, mips-tdep.c: Ditto.
	* printcmd.c, remote-vx.c, sh-stub.c, sh-tdep.c: Ditto.
	* sh64-tdep.c, source.c, stabsread.c, stack.c: Ditto.
	* standalone.c, symfile.c, symmisc.c, symtab.c: Ditto.
	* utils.c, valops.c, values.c, xcoffread.c: Ditto.
2003-09-16 18:56:35 +00:00
Andrew Cagney 52f0bd74b2 2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
	* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
	* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
	* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
	* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
	* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
	* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
	* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
	* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
	* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
	* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
	* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
	* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
	* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
	* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
	* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
	* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
	* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
	* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
	* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
	* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
	* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 16:32:14 +00:00
Andrew Cagney 627b3ba2d3 2003-09-12 Andrew Cagney <cagney@redhat.com>
* objfiles.h (struct entry_info): Deprecate "entry_file_lowpc" and
	"entry_file_highpc".  Update comments.
	* defs.h (deprecated_inside_entry_file): Rename
	"inside_entry_file".
	* blockframe.c (deprecated_inside_entry_file): Rename
	"inside_entry_file".
	* frame.c (get_prev_frame): Update.  Use if 0 instead of #if 0.
	* vax-tdep.c (vax_frame_chain): Update.
	* sh64-tdep.c (sh64_frame_chain): Update.
	* sh-tdep.c (sh_frame_chain): Update.
	* rs6000-tdep.c (rs6000_frame_chain): Update.
	* ns32k-tdep.c (ns32k_frame_chain): Update.
	* mips-tdep.c (mips_frame_chain): Update.
	* m68hc11-tdep.c (m68hc11_frame_this_id): Update.
	* m32r-tdep.c (m32r_frame_this_id): Update.
	* i386-interix-tdep.c (i386_interix_frame_chain_valid): Update.
	* frv-tdep.c (frv_frame_this_id): Update.
	* d10v-tdep.c (d10v_frame_this_id): Update.
	* cris-tdep.c (cris_frame_chain): Update.
	* blockframe.c (legacy_frame_chain_valid): Update.
	* avr-tdep.c (avr_frame_this_id): Update.
	* arm-tdep.c (arm_prologue_this_id): Update.
	* alpha-tdep.c (alpha_heuristic_frame_this_id): Update.
	* objfiles.c (objfile_relocate): Update.
	* mipsread.c (mipscoff_symfile_read): Update.
	(mipscoff_symfile_read): Update.
	* mdebugread.c (parse_partial_symbols): Update.
	* dwarfread.c (read_file_scope): Update.
	* dwarf2read.c (read_file_scope): Update.
	* dbxread.c (read_dbx_symtab): Update.
	(read_dbx_symtab): Update.
	* coffread.c (complete_symtab): Update.
2003-09-12 18:40:18 +00:00
David Carlton de4f826b0f 2003-06-11 David Carlton <carlton@bactrian.org>
* dictionary.h: New.
	* dictionary.c: New.
	* block.h: Add opaque declaration for struct dictionary.
	(struct block): Add 'dict' member; delete 'hashtable', 'nsyms',
	'sym' members.
	(BLOCK_DICT): New macro.
	Delete macros BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM,
	BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE,
	BLOCK_SHOULD_SORT.
	(ALL_BLOCK_SYMBOLS): Update definition.
	* Makefile.in (SFILES): Add dictionary.c.
	(dictionary_h): New.
	(COMMON_OBS): Add dictionary.o.
	(dictionary.o): New.
	(ada-lang.o): Depend on dictionary_h.
	(buildsym.o, coffread.o, jv-lang.o, mdebugread.o, objfiles.o)
	(stack.o, symmisc.o, symtab.o, tracepoint.o, valops.o)
	(mi-cmd-stack.o): Ditto.
	(gdbtk-cmds.o): Update dependencies.
	(gdbtk-stack.o): Ditto.
	* ada-lang.c: Include dictionary.h.
	(symtab_for_sym): Update uses of ALL_BLOCK_SYMBOLS.
	(fill_in_ada_prototype, debug_print_block): Ditto.
	(ada_add_block_symbols): Update uses of ALL_BLOCK_SYMBOLS; replace
	explicit iteration by use of ALL_BLOCK_SYMBOLS.  Delete variable
	'is_sorted'.
	* mdebugread.c: Include dictionary.h.
	(struct parse_stack): Delete 'maxsyms' member.
	(parse_symbol): Update calls to new_block.  Delete calls to
	shrink_block.  Use dictionary methods.
	(psymtab_to_symtab_1): Delete calls to sort_symtab_syms.
	Update calls to new_symtab.  Don't maintain maxsyms data.
	(mylookup_symbol): Update use of ALL_BLOCK_SYMBOLS.
	(add_symbol): Just call dict_add_symbol.
	(new_symtab): Delete 'maxsyms' argument.
	(new_symtab): Update calls to new_block.
	(new_block): Delete 'maxsyms' argument; add 'function' argument.
	(shrink_block): Delete function.
	(fixup_sigtramp): Update call to new_block.  Add symbol via
	dict_add_symbol.
	* jv-lang.c: Include dictionary.h.
	(get_java_class_symtab): Set the BLOCK_DICT of the blocks
	appropriately.  Set class_symtab->free_func.  Make sure the
	blockvector is big enough to hold two blocks.
	(add_class_symtab_symbol): Use dictionary methods.
	(free_class_block): New function.
	(type_from_class): Replace explicit iteration by
	ALL_BLOCK_SYMBOLS.
	* symtab.h (struct symtab): Replace 'free_ptr' method by
	'free_func'.
	* dwarf2read.c (psymtab_to_symtab_1): Delete call to
	sort_symtab_syms.
	* dwarfread.c (psymtab_to_symtab_1): Delete call to
	sort_symtab_syms.
	* coffread.c (coff_symfile_read): Delete call to sort_symtab_syms.
	Include dictionary.h.
	(patch_opaque_types): Update use of ALL_BLOCK_SYMBOLS.
	* dbxread.c (dbx_psymtab_to_symtab_1): Delete call to
	sort_symtab_syms.
	* objfiles.c: Include dictionary.h.
	(objfile_relocate): Update use of ALL_BLOCK_SYMBOLS.
	* buildsym.c: Include dictionary.h.
	(finish_block): Use dictionary methods.
	(end_symtab): Set free_func to NULL, not free_ptr.
	* tracepoint.c: Include dictionary.h.
	(add_local_symbols): Update use of ALL_BLOCK_SYMBOLS.
	(scope_info): Ditto.
	* stack.c: Include dictionary.h.
	(print_block_frame_locals): Update use of ALL_BLOCK_SYMBOLS.
	(print_block_frame_labels, print_frame_arg_vars)
	(print_frame_args): Ditto.
	* symmisc.c (free_symtab_block): Use dictionary methods.
	(dump_symtab): Ditto.
	(free_symtab): Replace use of 'free_ptr' by 'free_func'.
	Include	dictionary.h.
	* symfile.h: Delete declarations of sort_block_syms,
	sort_symtab_syms.
	* symfile.c (sort_block_syms): Delete.
	(sort_symtab_syms): Delete.
	* symtab.c: Include dictionary.h.
	(lookup_block_symbol): Use dictionary iterators.
	(find_pc_sect_symtab): Update use of ALL_BLOCK_SYMBOLS.
	(search_symbols, make_symbol_completion_list): Ditto.
	(make_symbol_overload_list): Ditto.
	* valops.c (value_of_local): Use dict_empty.
	Include dictionary.h.

2003-06-11  David Carlton  <carlton@bactrian.org>

	* generic/gdbtk-stack.c: Include dictionary.h.
	(gdb_block_vars): Update use of ALL_BLOCK_SYMBOLS.
	(gdb_get_blocks, gdb_get_vars_command): Ditto.
	* generic/gdbtk-cmds.c: Include dictionary.h.
	(gdb_listfuncs): Update use of ALL_BLOCK_SYMBOLS.

2003-06-11  David Carlton  <carlton@bactrian.org>

	* mi-cmd-stack.c: Include dictionary.h.
	(list_args_or_locals): Update use of ALL_BLOCK_SYMBOLS.
2003-06-11 23:29:49 +00:00
David Carlton 526e70c05f 2003-06-11 David Carlton <carlton@bactrian.org>
* block.h (BLOCK_SHOULD_SORT): Delete.
	* symtab.c (lookup_block_symbol): Don't worry about sorted linear
	blocks.
	* ada-lang.c (ada_add_block_symbols): Ditto.
	* symfile.c (sort_block_syms): Delete.
	(sort_symtab_syms): Ditto.
	* symfile.h: Delete sort_symtabs_syms and sort_block_syms
	declarations.
	* coffread.c (coff_symfile_read): Don't call sort_symtab_syms.
	* dbxread.c (dbx_psymtab_to_symtab_1): Ditto.
	* dwarf2read.c (psymtab_to_symtab_1): Ditto.
	* dwarfread.c (psymtab_to_symtab_1): Ditto.
	* hpread.c (hpread_psymtab_to_symtab_1): Ditto.
	* mdebugread.c (psymtab_to_symtab_1): Ditto.
	* xcoffread.c (xcoff_psymtab_to_symtab_1): Ditto.
2003-06-11 22:27:17 +00:00
Elena Zannoni 182d43bc6e 2003-05-23 Raoul Gough <RaoulGough@yahoo.co.uk>
Committed by Elena Zannoni  <ezannoni@redhat.com>.
  	* coffread.c(coff_symtab_read): Do relocate static symbols from PE
	files, don't relocate absolute symbols (and do use mst_abs).
2003-05-23 16:16:00 +00:00
Elena Zannoni 176620f10b 2003-05-14 Elena Zannoni <ezannoni@redhat.com>
* symtab.h (enum domain_enum): Rename from namespace_enum.
	(UNDEF_DOMAIN, VAR_DOMAIN, STRUCT_DOMAIN, LABEL_DOMAIN,
	VARIABLES_DOMAIN, FUNCTIONS_DOMAIN, TYPES_DOMAIN, METHODS_DOMAIN):
	Rename from UNDEF_NAMESPACE, VAR_NAMESPACE, STRUCT_NAMESPACE,
	LABEL_NAMESPACE, VARIABLES_NAMESPACE, FUNCTIONS_NAMESPACE,
	TYPES_NAMESPACE, METHODS_NAMESPACE.
	(SYMBOL_NAMESPACE): Rename to SYMBOL_DOMAIN.
	(struct symbol, struct partial_symbol): Rename field
	'namespace_enum namespace' to 'domain_enum domain'.
	(PSYMBOL_NAMESPACE): Rename to PSYMBOL_DOMAIN.
	Delete old define kludge for namespace.

	* ada-exp.y, ada-lang.c, ada-lang.h, alpha-tdep.c, arm-tdep.c,
	blockframe.c, c-exp.y, c-valprint.c, coffread.c, dbxread.c,
	dwarf2read.c, dwarfread.c, f-exp.y, gdbtypes.c, gdbtypes.h,
	gnu-v3-abi.c, hppa-tdep.c, hpread.c, jv-exp.y, jv-lang.c,
	language.c, linespec.c, m2-exp.y, m3-nat.c, mdebugread.c,
	mips-tdep.c, nlmread.c, objc-exp.y, objc-lang.c, objfiles.c,
	p-exp.y, p-valprint.c, parse.c, printcmd.c, scm-lang.c, source.c,
	stabsread.c, stack.c, symfile.c, symfile.h, symmisc.c, symtab.c,
	valops.c, values.c, xcoffread.c, xstormy16-tdep.c: Replace all
	occurrences of the above.

2003-05-12  Elena Zannoni  <ezannoni@redhat.com>

	* mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to
	VAR_DOMAIN.
2003-05-14 17:43:20 +00:00
David Carlton 22abf04a5d 2003-02-25 David Carlton <carlton@math.stanford.edu>
* symtab.h (SYMBOL_NATURAL_NAME): New macro.
	(SYMBOL_LINKAGE_NAME): Ditto.
	(SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and
	SYMBOL_LINKAGE_NAME.
	(struct general_symbol_info): Expand comment.
	(DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME.
	(SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME.
	(SYMBOL_MATCHES_REGEXP): Ditto.
	* symtab.c (symbol_natural_name): New function.
	* objfiles.h: Replace all uses of SYMBOL_NAME by
	DEPRECATED_SYMBOL_NAME.
	* xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto.
	* symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto.
	* somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto.
	* printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto.
	* minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto.
	* i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto.
	* gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto.
	* dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto.
	* cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto.
	* blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto.
	* ada-exp.y: Ditto.
	* ada-exp.y: Update copyright.
	* sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto.
	* cp-valprint.c: Ditto.

2003-02-25  David Carlton  <carlton@math.stanford.edu>

	* generic/gdbtk.h: Replace all instances of SYMBOL_NAME by
	DEPRECATED_SYMBOL_NAME.
	* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto.
	* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright.

2003-02-25  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with
	DEPRECATED_SYMBOL_NAME.  Update copyright.
2003-02-25 21:36:23 +00:00
Daniel Jacobowitz 7134143f53 * coffread.c (coff_symfile_read): Clean up minimal symbols earlier.
* dbxread.c (elfstab_build_psymtabs): Don't call
	install_minimal_symbols.
	(stabsect_build_psymtabs): Likewise.
	* elfread.c (elf_symfile_read): Call install_minimal_symbols
	earlier.
	* somread.c (som_symfile_read): Call install_minimal_symbols
	and do_cleanups earlier.
	* nlmread.c (nlm_symfile_read): Likewise.
	* mdebugread.c (elfmdebug_build_psymtabs): Call
	install_minimal_symbols and make appropriate cleanups.
2003-02-20 18:31:14 +00:00
Christopher Faylor 1b6bc7e06f * coff-pe-read.c: New file - support reading of minimal symbols from a portable
executable using the export table.
* coff-pe-read.h: New file.
* coffread.c: Include coff-pe-read.h.
(coff_symtab_read): Call read_pe_exported_syms iff no recognized debugging
symbols found.
* Makefile.in (SFILES): Add coff-pe-read.o.
(coff_pe_read_h): Define.
(COMMON_OBS): Add coff-pe-read.o.
(coffread.o): Add coff_pe_read_h dependency.
(coff-pe-read.o): New target.
2003-02-20 03:12:46 +00:00
David Carlton fe898f56a1 2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
	(block_h): New.
	(COMMON_OBS): Add block.o.
	(block.o): New.
	(x86-64-tdep.o): Add $(block_h).
	(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
	(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
	(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
	(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
	(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
	(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
	(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
	* value.h: Add opaque declaration for struct block.
	* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
	* ada-lang.h: Ditto.
	* x86-64-tdep.c: #include "block.h"
	* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
	* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
	* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
	* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
	* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
	* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
	* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
	* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
	* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
	(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
	* symtab.c (block_function): Ditto.
	(contained_in): Ditto.
	* frame.h: Move block_for_pc and block_for_pc_sect declarations to
	block.h.  Add opaque declaration for struct block.
	* symtab.h: Move block_function and contained_in declarations to
	block.h.  Add opaque declarations for struct block, struct
	blockvector.
	(struct block): Move to block.h.
	(struct blockvector): Ditto.
	(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
	(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
	(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
	(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
	(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
	Ditto.
	* block.c: New file.
	* block.h: New file.

2003-02-19  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: #include "block.h"
2003-02-20 00:01:07 +00:00
Daniel Jacobowitz 2de7ced707 * defs.h (streq): Add prototype.
* utils.c (streq): New function.

	* dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of
	SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME.
	* mdebugread.c (new_symbol): Likewise.
	* stabsread.c (define_symbol): Likewise.
	* coffread.c (process_coff_symbol): Likewise.
	* dwarfread.c (new_symbol): Likewise.

	* minsyms.c (prim_record_minimal_symbol_and_info): Use
	SYMBOL_SET_NAMES instead of setting SYMBOL_NAME.  Set the language
	here.
	(install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call
	SYMBOL_INIT_DEMANGLED_NAME.
	* objfiles.c: Include "hashtab.h".
	(allocate_objfile): Call htab_set_functions_ex for the
	demangled_names_hash.
	(free_objfile): Call htab_delete for the demangled_names_hash.
	* objfiles.h (struct htab): Add declaration.
	(struct objfile): Add demangled_names_hash.
	* symfile.c: Include "hashtab.h".
	(reread_symbols): Call htab_delete for the demangled_names_hash.
	(add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting
	SYMBOL_NAME in the bcache.
	* symtab.c: Include "hashtab.h".  Update comments.
	(create_demangled_names_hash, symbol_set_names): New functions.
	(symbol_find_demangled_name): New function, broken out from
	symbol_init_demangled_names.
	(symbol_init_demangled_names): Use it.
	* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses.
	(SYMBOL_SET_NAMES): New macro.
	(symbol_set_names): Add prototype.
2003-02-04 18:07:01 +00:00
Kevin Buettner 231367095d Replace complain() with complaint(). 2002-12-17 00:39:08 +00:00
Daniel Jacobowitz 01ad7f3617 * gdbtypes.h (struct main_type): Move artificial flag out of
loc.  New member of ``struct field'' named static_kind.  Reduce
	overloaded meaning of bitsize.
	(FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR)
	(TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise.
	(FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros.

	* ada-lang.c (fill_in_ada_prototype): Initialize static_kind for
	new fields.
	(template_to_fixed_record_type, template_to_static_fixed_type)
	(to_record_with_fixed_variant_part): Likewise.
	* coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise.
	* dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise.
	* dwarfread.c (struct_type, enum_type): Likewise.
	* hpread.c (hpread_read_enum_type)
	(hpread_read_function_type, hpread_read_doc_function_type)
	(hpread_read_struct_type): Likewise.
	* mdebugread.c (parse_symbol): Likewise.
2002-11-11 00:55:34 +00:00
Andrew Cagney 72367fb45b 2002-10-25 Andrew Cagney <cagney@redhat.com>
* complaints.h (struct deprecated_complaint): Rename `struct
	complaint'.
	* complaints.c (complain): Update.
	* remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
	incorrect comment indicating that "symfile.h" was being included
	for the `struct complaint' definition.
	* remote-vx.c: Update.
	* objc-lang.c: Update.
	* xcoffread.c: Update.
	* hpread.c: Update.
	* mdebugread.c: Update.
	* stabsread.c: Update.
	* dwarf2read.c: Update.
	* dwarfread.c: Update.
	* elfread.c: Update.
	* coffread.c: Update.
	* stabsread.h: Update.
	* dbxread.c: Update.
	* buildsym.c: Update.
	* gdbtypes.c: Update.
	* macrotab.c: Update.
2002-10-25 22:25:55 +00:00
Jim Blandy ebeb39fe31 * coffread.c (coff_symfile_read): Don't try to read the line
number table from disk if the image file doesn't have a symbol
table; we'll never actually look at the info anyway, and Windows
ships DLL's with bogus file offsets for the line number data.
2002-08-22 05:50:11 +00:00
Andrew Cagney 04ea0df192 2002-07-29 Andrew Cagney <ac131313@redhat.com>
* gdb_obstack.h: New file.
* symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
(obstack_chunk_alloc, obstack_chunk_free): Delete macros.
* objfiles.h: Include "gdb_obstack.h".
* Makefile.in (gdb_obstack_h): Define.
(symtab_h): Add $(gdb_obstack_h).
(objfiles_h): Add $(gdb_obstack_h).

* objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
* macrotab.c, cp-valprint.c, dbxread.c: Ditto.
* ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
* macroexp.c, p-typeprint.c, stabsread.c: Ditto.
* symtab.c, f-typeprint.c, mdebugread.c: Ditto.
* p-valprint.c, symmisc.c, typeprint.c: Ditto.
* symfile.c, coffread.c, c-typeprint.c: Ditto.
* buildsym.c, bcache.c, ada-typeprint.c: Ditto.

* Makefile.in (bcache.o): Update dependencies.
(buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
(ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
(dbxread.o, dstread.o, f-typeprint.o): Ditto.
(objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
(stabsread.o, symfile.o, symmisc.o): Ditto.
(symtab.o, typeprint.o, macroexp.o): Ditto.
(macrotab.o, mdebugread.o): Ditto.
(f_lang_h, coff_sym_h, coff_symconst_h): Define.
(coff_ecoff_h, aout_aout64_h): Define.
(aout_stabs_gnu_h, libaout_h): Define.
2002-07-29 22:55:26 +00:00
Daniel Jacobowitz 261397f84f 2002-07-11 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Daniel Berlin <dberlin@dberlin.org>.
	* buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
	(finish_block) For non-function blocks, hash the symbol table.  For
	function blocks, mark the symbol table as unhashed.
	* minsyms.c (msymbol_hash): Return hash value without taking modulus.
	(msymbol_hash_iw): Likewise.
	(add_minsym_to_hash_table): Take modulus of msymbol_hash's return
	value.
	(add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
	(lookup_minimal_symbol): Likewise for both.
	* symtab.h (struct block): Add `hashtable' flag.  Comment the
	hashtable.
	(BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
	(ALL_BLOCK_SYMBOLS): Update.
	(BLOCK_SHOULD_SORT): Do not sort hashed blocks.
	(struct symbol): Add `hash_next' pointer.
	* symtab.c (lookup_block_symbol): Search using the hash table when
	possible.
	(find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
	(search_symbols, find_addr_symbol): Likewise.

	* dstread.c (process_dst_block): Clear hashtable bit for new block.
	(read_dst_symtab): Likewise.
	* jv-lang.c (get_java_class_symtab): Likewise.
	* mdebugread.c: Include "gdb_assert.h".
	(shrink_block): Assert that the block being modified is not hashed.
	* coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
	* symmisc.c (free_symtab_block): Walk the hash table when freeing
	symbols.
	(dump_symtab): Recognize hashed blocks.
	* printcmd.c (print_frame_args):  Assert that function blocks do not
	have hashed symbol tables.
	* ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
	(fill_in_ada_prototype, debug_print_block): Likewise.
	(ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS.  Handle hash tables.
2002-07-11 20:46:19 +00:00
Alexandre Oliva 12b9c64f8d * coffread.c: Remove redundant static declarations. Replace
occurrences of `PTR' with `void *'.
* elfread.c, mdebugread.c, minsyms.c, mipsread.c: Likewise.
* top.h (quit_cover): Likewise.
* defs.h (catch_errors): Likewise.
2002-03-19 19:00:04 +00:00
Elena Zannoni a2cf933af4 2002-02-04 Elena Zannoni <ezannoni@redhat.com>
* gdbarch.sh: Add definitions for COFF_MAKE_MSYMBOL_SPECIAL and
	ELF_MAKE_MSYMBOL_SPECIAL.
	* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.c (default_elf_make_msymbol_special,
        default_coff_make_msymbol_special): New functions.
	* arch-utils.h (default_elf_make_msymbol_special,
        default_coff_make_msymbol_special): Export.
	* elfread.c (elf_symtab_read): Compile use of
	ELF_MAKE_MSYMBOL_SPECIAL unconditionally because it is now
	multiarched.
	* coffread.c (coff_symtab_read): Ditto, for
	COFF_MAKE_MSYMBOL_SPECIAL.
2002-02-06 01:20:23 +00:00
Richard Earnshaw 181c1381a5 * gdbarch.sh (copyright): Update years in generated header.
(SMASH_TEXT_ADDRESS): Add rule.
*gdbarch.h, gdbarch.c: Re-generate.
* coffread.c: Multi-arch uses of SMASH_TEXT_ADDRESS.
* dbxread.c: Likewise.
* dwarfread.c: Likewise.
* elfread.c: Likewise.
* somread.c: Likewise.

* arm-tdep.c (arm_smash_text_address): New function.
* config/arm/tm-arm.h (SMASH_TEXT_ADDRESS): Define in terms of above.
2002-02-04 11:55:36 +00:00
Andrew Cagney 255e7dbf2e * utils.c (error_begin): Make static.
* defs.h (error_begin): Delete declaration.

* linespec.c (cplusplus_error): Replace cplusplus_hint.
(decode_line_1): Use cplusplus_error instead of error_begin,
cplusplus_hint and return_to_top_level.
* coffread.c (coff_symfile_read): Use error instead of error_begin
and return_to_top_level.
* infrun.c (default_skip_permanent_breakpoint): Ditto.
2002-02-02 03:42:59 +00:00
Andrew Cagney d7449b42d3 s/BIG_ENDIAN/BFD_ENDIAN_BIG/ 2002-01-05 04:30:46 +00:00
Andrew Cagney aac7f4eaf2 mfree() -> xmfree(). 2001-12-02 22:38:23 +00:00
Alan Modra 3a42e9d062 * coffread.c: Replace all occurrences of bfd_read with bfd_bread.
* dbxread.c: Likewise.
	* dwarf2read.c: Likewise.
	* dwarfread.c: Likewise.
	* somread.c: Likewise.
	* ultra3-nat.c: Likewise.
	* xcoffread.c: Likewise.
2001-09-20 03:03:40 +00:00
Eli Zaretskii 42a076f06f * coffread.c (coff_symfile_read): Parse DWARF2 info if present. 2001-07-01 10:04:58 +00:00
Alexandre Oliva 09d011c5ca * symfile.c (compare_psymbols, compare_symbols): Declare using
PTR, as in the definition.
* minsyms.c (compare_minimal_symbols): Likewise.
* coffread.c (find_targ_sec): Likewise.
* elfread.c (free_elfinfo, elf_locate_sections): Likewise.
* mipsread.c (alphacoff_locate_sections): Likewise.
* mdebugread.c (compare_blocks): Likewise.
2001-05-29 10:45:10 +00:00
Elena Zannoni 6ec4c4bd0e 2001-03-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From  Andrew Cagney  <ac131313@redhat.com>

        * coffread.c: Include "gdb_assert.h".
	(coff_symtab_read): Cast the integer s_sclass to a long before
 	casting it to a pointer.
2001-03-26 02:50:46 +00:00
Elena Zannoni b9179dbce9 2001-03-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From  Andrew Cagney  <ac131313@redhat.com>

        * coffread.c (coff_symtab_read): Initialize
 	``fcn_first_line_addr''.  Check that the ``.bf'' always preceeds
 	the ``.ef'' info.
	* dbxread.c (find_text_range): Initialize ``start'' and ``end''.
2001-03-26 02:48:23 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Andrew Cagney 88c72b7d71 Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
2000-12-04 04:01:16 +00:00
Kevin Buettner 44c75fb368 Call end_symtab() with SECT_OFF_TEXT (objfile). 2000-10-24 21:13:08 +00:00
Elena Zannoni a4c8257b03 2000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss
 	here, let the users of the macro do it.
	* symtab.h (ANOFFSET): Detect here if the section index is not
 	initialized.
	* xcoffread.c (find_targ_sec): Don't treat .bss as special,
 	because some objfiles may not have that section at all.
	* coffread.c (cs_to_section): Ditto.
	* elfread.c (elf_symtab_read): Detect an uninitialized index
 	value.
	(elfstab_offset_sections): The macro ANOFFSET cannot be used as an
 	lvalue anymore.
	* remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use
 	ANOFFSET as an lvalue.
	* objfiles.c (objfile_relocate, objfile_relocate): Don't use
 	ANOFFSET as an lvalue.
	* symfile.c (default_symfile_offsets): Don't use ANOFFSET as an
 	lvalue.
2000-08-07 15:02:48 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Elena Zannoni 34e924c066 * symfile.c (add_symbol_file_command): Properly reformat "else if"
code.
	* coffread.c (coff_symtab_read): Ditto.
2000-06-12 14:05:44 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 74b7792f0f Purge (almost) make_cleanup_func. 2000-05-22 09:02:23 +00:00
Andrew Cagney 56e290f494 Cleanup discard_minimal_symbols cleanup. 2000-05-16 04:07:39 +00:00
Elena Zannoni 2ec466f950 2000-05-11 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* coffread.c (coff_symtab_read): In the case of C_THUMBEXT |
 	C_THUMBEXTFUNC | C_EXT, sec will never ever be the index for
 	.rodata, because cs_to_section doesn't deal with .rodata. Fix test
 	accordingly.
2000-05-11 20:39:58 +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
Philippe De Muyter c13c43fdda * ax-gdb.c (agent_command): Remove now useless cast of
`free_current_contents' when passed to `make_cleanup'.
	* coffread.c (coff_symfile_read): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto.
	(dwarf_decode_lines): Ditto.
	* eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto.
	(parse_and_eval, parse_to_comma_and_eval): Ditto.
	* parse.c (parse_exp_1): Ditto.
	* printcmd.c (print_command_1, output_command, set_command): Ditto.
	(x_command, print_frame_args, printf_command): Ditto.
	* top.c (execute_control_command): Ditto.
	* tracepoint.c (validate_actionline): Ditto.
	* typeprint.c (whatis_exp, ptype_command): Ditto.
	(maintenance_print_type): Ditto.
2000-04-26 12:41:48 +00:00
Jim Kingdon 745b8ca0fc Clean up compiler warnings:
* bcache.h, bcache.c, c-valprint.c, coffread.c, stabsread.c,
	stack.c, valprint.c: Change variables to unsigned.
	* bcache.c: Rearrange to avoid warnings about variables not being set.
	* c-lang.c, ch-lang.c, f-lang.c, m2-lang.c: Include valprint.h
	rather than declaring print_max and repeat_count_threashold
	ourselves (incorrectly).
	* valprint.h: Do declare repeat_count_threashold.
	* ch-exp.c: Use default case for internal error.
	* findvar.c: Don't omit argument type.
	* symtab.c: Remove unused variable.
2000-02-08 04:39:02 +00:00
Jason Molenda 0d06e24ba7 import gdb-2000-01-10 snapshot 2000-01-11 03:07:37 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +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 cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +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
Stan Shebs aa8938d581 Sat Nov 21 17:15:40 1998 Philippe De Muyter <phdm@macqel.be>
* coffread.c (coff_symtab_read): Discard C_LABEL's that are not
	function entry points, to avoid getting them in the stack dump
	instead of the actual function.
1998-11-21 19:59:37 +00:00
Nick Clifton 4269399c3d Fix Thumb breakpoints and diassembly. 1998-04-01 05:46:36 +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
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
Jim Kingdon 62fad389f2 * coffread.c (coff_symtab_read): If we get the address from
target_lookup_symbol, set the section to -2 not SECT_OFF_BSS.
	(coff_symtab_read): Set value and section of symbol that
	process_coff_symbol returns.
1994-10-26 21:50:19 +00:00
Jim Kingdon 3a47045432 * objfiles.c (objfile_relocate): When relocating ->sections, use
objfile not symfile_objfile.

	* symtab.h, minsyms.c (minsyms_sort): New function.
	* objfiles.c (objfile_relocate): Call it.

	* remote-vx.c (vx_add_symbols): Call breakpoint_re_set.

	* objfiles.c, objfiles.h (objfile_to_front): New function.
	* remote-vx.c (vx_add_symbols): Call it.

	* coffread.c (coff_symtab_read): Handle common symbols the same
	way that partial-stab.h does.
1994-10-20 05:15:46 +00:00
Jim Kingdon e7b5942b5c * Makefile.in (ALLDEPFILES): Remove xcoffexec.c.
* Makefile.in: Remove xcoffexec.o rule.

	* exec.c (exec_file_command): Add comment.

	Fix data and bss relocation for VxWorks 5.1:
	* remote-vx.c (vx_add_symbols): New function.
	(vx_load_command, add_symbol_stub): Call it instead of
	symbol_file_add.
	(vx_wait): Remove comment which was wrong to useless.
	* remote-vx.c: Reindent much of file.
	* coffread.c (cs_to_section, find_targ_sec): New functions.
	(process_coff_symbol): Set SYMBOL_SECTION to result
	from cs_to_section.
	(coff_symtab_read): Call cs_to_section and deal appropriate
	rather than assuming sections are in a certain order.  Deal with
	BSS.
	* coffread.c: Remove text_bfd_scnum variable.
1994-10-17 21:21:52 +00:00
Jim Kingdon ab93997d68 * coffread.c (complete_symtab): If last_source_file is set upon
entry, free it.
1994-09-29 15:09:51 +00:00
Jim Kingdon 602d41e523 * coffread.c (init_stringtab): When copying length to stringtab,
use target format, not host format, since that is what the rest of
	the code assumes.
1994-09-20 18:39:25 +00:00
Stan Shebs e1118f1582 Fix a typo in last change 1994-09-03 01:15:15 +00:00
Stan Shebs 7f4c859520 * objfiles.c (allocate_objfile): Add the newly-created objfile to
the end of the list of objfiles, instead of at the beginning.

	* xcoffread.c (allocate_include_entry): New function, abstracted
	from code in record_include_begin.
	(record_include_begin, record_include_end): Call it.

	* blockframe.c (reinit_frame_cache): Test inferior_pid instead of
	target_has_stack to decide whether to create a real stack frame
	for the cache.

	* coffread.c (process_coff_symbol) [CXUX_TARGET]: Ignore vendor
	section.
	* config/m88k/tm-cxux.h (CXUX_TARGET): Define.

	* h8300-tdep.c: Include "dis-asm.h" instead of <dis-asm.h>.
1994-09-03 00:32:08 +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
Ian Lance Taylor bf8d9d28c6 * coffread.c (read_one_sym): bfd_coff_swap_aux_in now takes
additional arguments.
	* xcoffread.c (read_xcoff_symtab, read_symbol_lineno): Likewise.
1994-02-01 17:26:01 +00:00
Jim Kingdon 27ad511f84 * coffread.c, xcoffread.c: Include <coff/internal.h>
before "symfile.h".
1994-01-21 14:26:20 +00:00
Jim Kingdon dbb0fae2de * coffread.c (coff_getfilename): Make it not static. 1994-01-21 00:34:07 +00:00
Jim Kingdon af8b790667 * xcoffread.c (read_xcoff_symtab, case C_FILE): Accept the name
from either the symbol name or the auxent.
	* coffread.c, symfile.h (coff_getfilename): Renamed from getfilename,
	no longer static.
1994-01-18 03:42:30 +00:00
Jim Kingdon 0eed42deee * symfile.h (sym_fns), symfile.c (find_sym_fns), xcoffread.c,
coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c:
	Change from using bfd target name to using the flavour.
1993-10-31 18:54:28 +00:00
Jim Kingdon 4d57c5995e * symfile.c (reread_symbols): When re-reading symbols, do all the
right operations ourself, rather than calling symbol_file_command.
	If we re-read something, call clear_symtab_users not just
	breakpoint_re_set.
	* objfiles.h, objfiles.c (build_objfile_section_table): No longer
	static.
	* symfile.c (clear_symtab_users): Call clear_pc_function_cache.
	* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
	(*_symfile_offsets): Set objfile->num_sections.
	* remote.c (remote_wait), symfile.c (syms_from_objfile):
	Don't muck with objfile->num_sections now that all the symbol
	readers set it.
	* elfread.c: Clean up obsolete comment about handling only DWARF.
	* paread.c: Remove comment about how we should use an "ordinary"
	file format with an hppa suffix.  There is nothing ordinary about SOM.
1993-10-30 20:21:19 +00:00
Jim Kingdon 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Jim Kingdon 9c38eb65ac * target.h: Put remote_debug declaration back here. Add baud_rate.
* remote.c, remote-udi.c, remote-utils.h: Let target.h take care of
	declaring these.  Those random externs all over are error prone.
	* Move "set remotebaud" from remote-utils.c to main.c to it applies
	to remote.c as well.

	* xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
	Sort symtabs for this objfile only, not for all objfiles.
	* symfile.c, symfile.h (sort_all_symtab_syms): Remove; no longer used.
1993-10-21 05:22:34 +00:00
Jim Kingdon 8f6960c90e * xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
Sort symtabs for this objfile only, not for all objfiles.
	* symfile.c, symfile.h (sort_all_symtab_syms): Remove; no longer used.
1993-10-21 04:41:56 +00:00
Jim Kingdon 0ccbaadcf2 * dbxread.c, coffread.c: A few changes to comments. 1993-09-29 04:15:43 +00:00
Stan Shebs b5b186a2cd Additions to support stabs-in-coff. 1993-09-29 01:53:52 +00:00
Jim Kingdon 5573d7d4b1 Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.

	Clean up problems with targets and hosts that have 64 bit longs
	and pointers and 32 bit ints.
	* breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
	ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
	expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
	m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
	printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Change all printf formats from %x to %lx if outputting an address.
	Change la_*_format to use long format.
	local_hex_string, local_hex_string_custom now take an unsigned long
	argument, change all callers.
	* coffread.c (read_coff_symtab):  Remove superfluous cast for
	complaint output.
	* dbxread.c (end_psymtab):  Cast MSYMBOL_INFO to long, not int.
	* findvar.c, value.h (write_register):  Change register value to long.
	* gdbtypes.h (struct type):  Change `bitsize' to long as
	TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
	* inferior.h (struct inferior_status):  Change type of stop_pc to
	CORE_ADDR.
	* language.h (local_octal_string, local_octal_string_custom):
	Remove prototype, the functions are neither defined nor used.
	* mipsread.c (parse_symbol):  Use temporary variable for bitsize as
	f->bitsize is a long now.
	* objfiles.c (add_to_objfile_sections, build_objfile_section_table):
	Use unsigned long casts instead of int for abusing sections_end
	pointer as integer.
	* stack.c (parse_frame_specification):  Change type of `args' to
	CORE_ADDR for SETUP_ARBITRARY_FRAME.

	* printcmd.c (make_vasize):  Allow redefinition via MAKEVA_SIZE.
	* mipsread.c (parse_type):  Alpha cc now supports the t->continued
	bit, update algorithm to match the way the compiler uses it.
1993-09-28 17:43:25 +00:00
Stu Grossman f0fcf00aad * coffread.c (read_coff_symtab): Don't call getfilename if there
are no auxents.
1993-09-28 01:19:07 +00:00
Jim Kingdon fc77365385 * paread.c, coffread.c, elfread.c: Include <time.h> before libbfd.h. 1993-09-14 18:10:42 +00:00
Jim Kingdon 6b510f8feb * coffread.c: Re-work a lot of the coff-specific stuff to use stuff
in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".
1993-09-01 23:43:07 +00:00
Jim Kingdon 3ffb74b9ab * coffread.c: Re-work a lot of the coff-specific stuff to use stuff
in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".
1993-09-01 23:11:30 +00:00
Jim Kingdon c438b3af2a * symtab.h (struct linetable), xcoffread.c (arrange_linetable):
Revise comments re linetable sorting.
	* buildsym.c (compare_line_numbers): Sort by pc, not by line.
	* coffread.c: Tell end_symtab to sort the line table.

	* coffread.c: Re-work a lot of the coff-specific stuff to use stuff
	in buildsym.c.  This includes coff_finish_block, coff_context_stack,
	coff_local_symbols, coff_file_symbols, coff_global_symbols,
	coff_end_symtab and coff_add_symbol_to_list.
	(read_enum_type): Deal with it now that we have a "struct pending"
	not a "struct coff_pending".

	* buildsym.c (end_symtab): Don't realloc subfile->linetable.
1993-09-01 21:15:27 +00:00
Jim Kingdon e09c5e26b8 * coffread.c (process_coff_symbol): Ignore tagnames like .0fake.
* coffread.c (coff_read_enum_type): #if 0 out code which changes
	enum {FALSE, TRUE} into boolean.
1993-08-19 23:33:59 +00:00
Jim Kingdon fc312cc6f9 revise comment for last change 1993-04-22 04:05:51 +00:00
Jim Kingdon f2c365f517 * coffread.c (read_coff_symtab): Use rewind before fseek. 1993-04-21 21:49:07 +00:00
John Gilmore c653bc6d90 Fix long file name bug reported on SCO Open Desktop 2.0 by Ulf Lunde
<Ulf.Lunde@kvatro.no> and Dag H. Wanvik <Dag.H.Wanvik@kvatro.no>.

* coffread.c (getfilename):  Eliminate COFF_NO_LONG_FILE_NAMES
test, which is apparently left over from when we used native
include files and couldn't depend on the member names being there.
* tm-3b1.h, tm-altos.h, tm-i386v.h:  Don't set it.

ALso fix this in tm-i860.h which isn't ChangeLogged since it's sanitized out
for lack of paperwork.
1993-02-05 22:09:17 +00:00
Fred Fish a8a69e6332 * Makefile.in (VERSION): Bump to 4.7.4.
* Makefile.in (SFILES_MAINDIR):  Add typeprint.c, c-typeprint.c,
	  m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
	* Makefile.in (HFILES):  Add valprint.h.
	* Makefile.in (OBS):  Add typeprint.o, c-typeprint.o,
	  m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
	* typeprint.c, typeprint.h:  New files for language independent
	  type printing functions.
	* c-typeprint.c, m2-typeprint.c:  New files for language dependent
	  type printing functions and definitions.
	* valprint.h:  New include file for language independent value
	  printing definitions.
	* c-valprint.c, cp-valprint.c, m2-valprint.c:  New files for language
	  dependent value printing functions.
	* c-exp.y (production ptype):  Add range_type variable and use new
	  create_range_type function.
	* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
	  infcmd.c (path_var_name), language.c (unk_op_print_tab),
	  m2-lang.c (m2_op_print_tab):  Change from ANSI-obsolescent
	  "const static" to ANSI-conformant "static const".
	* c-exp.y (c_create_fundamental_type):  Remove unused nbytes.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add c_print_type,
	  and c_val_print.
	* c-lang.h (c_print_type, c_val_print):  Add prototypes.
	* coffread.c (decode_type):  Add range_type variable and call to
	  new create_range_type function.
	* complaints.c (complain):  Remove unused val variable.
	* complaints.c (_initialize_complaints):  Make it void.
	* convex-tdep.c (value_of_trapped_internalvar):  Add range_type
	  variable and call new create_range_type function.
	* defs.h (enum val_prettyprint):  Move enum from value.h to here
	  so we can avoid having to include value.h just for prototypes that
	  need the enum (thanks ANSI).
	* dwarfread.c (struct_type):  Local anonymous_size variable is
	  only used if !BITS_BIG_ENDIAN.
	* dwarfread.c (decode_subscript_data_item):  Add rangetype
	  variable and call new create_range_type function.
	* elfread.c (elf_symfile_read):  Remove unused dbx and text_sect
	  variables.
	* eval.c (evaluate_subexp):  Remove unused local variable name
	  and the statement with no side effects that initializes it.
	* expprint.c (print_subexp):  Change local_printstr to
	  LA_PRINT_STRING.
	* gdbtypes.c (create_range_type):  New function that creates
	  a range type using code fragments from object file readers as
	  an example of what has to be initialized.
	* gdbtypes.c (create_array_type):  Removed index_type, low_bound,
	  and high_bound parameters, replaced with a single range_type
	  parameter.  Change function body to use passed in range_type
	  rather than handcrafting one.
	* gdbtypes.h (create_range_type):  Add prototype.
	* gdbtypes.h (create_array_type):  Change prototype parameters.
	* infrun.c (normal_stop):  Remove unused local variables tem and c.
	* infrun.c (hook_stop_stub):  Return 0 rather than random value.
	* language.c (unk_lang_print_type, unk_lang_val_print):  Add
	  stub functions that call error if called.
	* language.c (unknown_language_defn, auto_language_defn,
	  local_language_defn):  Add initializers unk_lang_print_type and
	  unk_lang_val_print.
	* language.h (struct language_defn):  Reformat for larger
	  comments, add la_print_type and la_val_print members.  Add
	  LA_PRINT_TYPE and LA_VAL_PRINT macros.  Change local_printchar
	  to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
	* m2-lang.c (m2_create_fundamental_type):  Remove unused local
	  variable nbytes.
	* m2-lang.c (m2_language_defn):  Add initializers m2_print_type
	  and m2_val_print.
	* m2-lang.h (m2_print_type, m2_val_print):  Add prototypes.
	* main.c (execute_command): Remove unused local variable cmdlines.
	* main.c (echo_command), stabsread.c (read_type), printcmd.c
	  (clear_displays), symmisc.c (block_depth), values.c
	  (clear_value_history):
	  Make testing of truth value of assignment result explicit.
	* mipsread.c (upgrade_type):  Update FIXME to include future use
	  of create_range_type.
	* printcmd.c (ptype_command, ptype_eval, whatis_command,
	  whatis_exp, maintenance_print_type):  Move prototypes and functions
	  to new typeprint.c.
	* printcmd.c (_initialize_printcmd):  Move add_com calls for
	  ptype_command and whatis_command to new typeprint.c.
	* ser-bsd.c (serial_open):  Remove unused variable sgttyb.
	* source.c (find_source_lines):  Local variable c only used
	  when LSEEK_NOT_LINEAR is defined.
	* stabsread.c (read_array_type):  Use new create_range_type
	  function.
	* stabsread.c (read_range_type):  Add new index_type variable and
	  call new create_range_type function rather than handcrafting
	  range types.
	* symmisc.c (type_print_1):  Change usages to LA_PRINT_TYPE.
	* symtab.c (typedef_print usages):  Use c_typedef_print, renamed.
	* symtab.c (type_print_base usages):  Use c_type_print_base.
	* symtab.c (type_print_varspec_prefix usages):  Use
	  c_type_print_varspec_prefix.
	* symtab.c (type_print_method_args usages):  Use
	  cp_type_print_method_args.
	* valprint.c:  Completely ripped apart and the fragments used
	  to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
	  valprint.h.  Remaining stuff is language independent.
	* value.h (struct fn_field):  Forward declare for prototypes.
	* value.h (type_print_1):  Remove prototype.
	* value.h (enum val_prettyprint):  Moved to defs.h.
	* value.h (typedef_print):  Prototype renamed to c_typedef_print.
	* value.h (baseclass_offset):  Add prototype.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-typeprint.c, ch-valprint.c.
	* Makefile.in (OBS):  Add ch-typeprint.o, ch-valprint.o.
	* ch-typeprint.c:  New file for language dependent type printing.
	* ch-valprint.c:  New file for language dependent value printing.
	* ch-exp.y (parse_number):  Remove prototype and stub function.
	* ch-exp.y (decode_integer_literal):  Removed unused digits and
	  temp variables.
	* ch-exp.y (convert_float):  Completely ifdef out for now.
	* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
	  ch-lang.c (chill_op_print_tab):
	  Change from ANSI-obsolescent "const static" to ANSI-conformant
	  "static const".
	* ch-exp.y (yylex):  Add unhandled storage class enumeration
	  literals to switch statement for completeness.
	* ch-lang.c (chill_create_fundamental_types):  Remove unused
	  nbytes variable.  Change dummy type to 2 bytes to match int.
	  Handle FT_VOID types gratuituously added to chill DWARF by
	  compiler.  Change FT_CHAR case to generate an TYPE_CODE_CHAR
	  type rather than a one byte TYPE_CODE_INT type.
	* ch-lang.c (chill_language_defn):  Add chill_print_type and
	  chill_val_print.
	* ch-lang.h (chill_print_type, chill_val_print):  Add prototypes.
	**** end-sanitize-chill ****
1992-12-18 20:21:32 +00:00
John Gilmore de9bef49be Eliminate uses of NAMES_HAVE_UNDERSCORE, using
bfd_get_symbol_leading_char instead.

* coffread.c (EXTERNAL_NAME):  New macro for removing possible
leading character from names.
(read_coff_symtab):  Use BFD's FILE *, don't open a second one.
(read_coff_symtab):  Complain() about .bb/.eb mismatch, don't error().
(process_coff_symbol, coff_read_struct_type, coff_read_enum_type):
Replace NAMES_HAVE_UNDERSCORE with EXTERNAL_NAME.

* kdb-start.c (main):  Remove NAMES_HAVE_UNDERSCORE.
* minsyms.c (install_minimal_symbols):  Replace NAMES_HAVE_UNDERSCORE.
Remove SOME_NAMES_HAVE_DOT support (apparently unused).
* partial-stab.h:  Replace NAMES_HAVE_UNDERSCORE.
* solib.c:  Replace NAMES_HAVE_UNDERSCORE.
* stabsread.h:  Remove NAMES_HAVE_UNDERSCORE and HASH_OFFSET.
* symfile.c (syms_from_objfile):  Insert debugging check to test
NAMES_HAVE_UNDERSCORE setting against the BFD support.  FIXME,
remove this (and all tm-*.h NAMES_HAVE_UNDERSCORE) soon.

* doc/gdbint.texinfo (Host Conditionals):  Remove
NAMES_HAVE_UNDERSCORE, SOME_NAMES_HAVE_DOT, document
MEM_FNS_DECLARED.
(Target Conditionals):  Remove all of the above.
1992-12-17 09:15:10 +00:00
Ian Lance Taylor 117f631e54 Tue Dec 15 10:05:56 1992 Ian Lance Taylor (ian@cygnus.com)
* coffread.c (decode_type): catch negative tagndx fields generated
	by SCO 3.2v4 cc.
	* exec.c: comment out string following #endif.
	* configure.in (i[34]86-*-sco3.2v4*): use host i386sco4.
	* xm-i386sco.h: include <sys/types.h> and <sys/dir.h>, required by
	<sys/user.h>.
	* config/i386sco4.mh: new file; like i386sco.mh, but don't require
	gcc, and define const to empty to avoid SCO 3.2v4 cc bug.
1992-12-15 18:12:37 +00:00
Fred Fish 51b80b0072 * complaints.c: New file, code moved from utils.c.
* complaints.c (complain):  Made into a varargs function.
	* complaints.h:  New file, code moved from symfile.h.
	* Makefile.in (SFILES_MAINDIR):  Add complaints.c.
	* Makefile.in (HFILES):  Add complaints.h.
	* Makefile.in (OBS):  Add complaints.o.
	* symfile.c (complaint_root, stop_whining, complaint_series,
	complain, clear_complaints, add_show_from_set for stop_whining):
	Moved to complaints.c.
	* symfile.h (struct complaint, complaint_root decl, complain
	prototype, clear_complaints prototype):  Moved to complaints.h.
	* buildsym.c, coffread.c, dbxread.c, dwarfread.c, elfread.c,
	gdbtypes.c, mipsread.c, stbsread.c, symfile.c:  Include
	complaints.h.  Remove casts from arguments to complain(),
	which is now a varargs function, and remove unnecessary
	placeholder zero args.
	* defs.h (begin_line):  Add prototype.
	* defs.h (vprintf_filtered):  Add prototype.
	* dwarfread.c (varargs.h):  Remove, no longer needed.
	* dwarfread.c (dwarfwarn):  Remove prototype and function.
	* dwarfread.c (complaints):  Define a bunch of complaints.
	* dwarfread.c (SQUAWK):  Remove macro defs, convert all
	usages to standard complain() calls.
	* utils.c (begin_line):  New function that ensures that
	whatever gets filter-printed next starts on its own line.
	* utils.c (vprintf_filtered):  New func, like vfprintf_filtered,
	but to stdout (calls vfprintf_filtered internally).
1992-12-15 12:18:53 +00:00
Fred Fish 85f0a8484f * gdbtypes.c (create_array_type): Complete rewrite. Now requires
a optional type to decorate as an array type, the type of the
	index, and the bounds of the array.  Records this additional info
	in the array type for use with languages with nonzero array
	bounds.
	* gdbtypes.h (enum type_code):  Update comment for TYPE_CODE_ARRAY
	to note that arrays may have bounds.
	* gdbtypes.h (create_array_type):  Update prototype.
	* c-exp.y (ptype production):  Adjust for new create_array_type
	calling conventions.
	* coffread.c (decode_type):  Call create_array_type rather than
	handcrafting array types.
	* convex-tdep.c (value_type):  Remove, now use create_array_type.
	* convex-tdep.c (value_of_trapped_internalvar):  Convert calls to
	vector_type into calls to create_array_type.
	* dwarfread.c (decode_subscr_data):  Name changed to
	decode_subscript_data_item throughout.
	* dwarfread.c (decode_subscript_data_item):  Rewrite to use
	create_array_type.  Now records index type and range as well.
	* dwarfread.c (dwarf_read_array_type):  Rewrite as part of
	change to use create_array_type.
	* dwarfread.c (read_subroutine_type):  Test existing user defined
	types before decorating them, to ensure they are blank, and
	complain about it if they are not.
	* dwarfread.c (decode_fund_type):  For unrecognized types, always
	return some valid type (type integer).  If the unrecognized type
	cannot be an implementation defined type, complain as well.
	* m88k-tdep.c (pushed_size):  Update comment for TYPE_CODE_ARRAY.
	* m88k-tdep.c (store_param):  Update comment for TYPE_CODE_ARRAY.
	* mipsread.c (upgrade_type):  Add FIXME comment that code to
	handcraft arrays should be replaced with call to create_array_type.
	* stabsread.c (read_array_type):  Replace code to handcraft
	array types with call to create_array_type.
	* valprint.c (type_print_varspec_prefix):  Minor formatting
	change, join lines that don't need to be split.
1992-12-15 02:52:11 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00
Fred Fish e676a15f0b * Makefile.in (VERSION): Bump to 4.5.6.
* coffread.c (coff_end_symtab):  Cast 2nd arg of complain() to
	correct type.
	* defs.h (NORETURN):  Define away for Lucid compiler.
	* remote.c (remote_timer, remote_interrupt):  Signal handlers
	take one int arg.
	* ser-termios.c (serial_write, serial_close):  Return whatever
	value the write/close call returns, rather than falling off end.
	* inferior.h (PTRACE_ARG3_TYPE):  Third arg to ptrace is int on
	more systems than it is "char *".  Define PTRACE_ARG3_TYPE to
	default to int.
	* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
	inferior.h (call_ptrace):  Use PTRACE_ARG3_TYPE to declare type
	of third arg.
	* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
	m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
	pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
	symm-xdep.c, ultra3-xdep.c:  Use PTRACE_ARG3_TYPE to cast ptrace
	argument 3.
	* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
	store_inferior_registers): Supply missing fourth argument to
	ptrace().
1992-06-24 04:49:48 +00:00
John Gilmore f70be3e45a COFF changes for dealing better with EPI 29K C compiler output.
* coffread.c (record_minimal_symbol):  Pass the minsym type to it.
Callers changed.
(coff_end_symtab):  Sort blocks if needed.  Complain if misordered.
(read_coff_symtab):  Move patch_opaque_types call from
coff_symfile_read.  Restrict it to symtabs from this objfile.
(process_coff_symbol: C_TPDEF):  Don't put ordinary foward
references on opaque type chain; just let coff_lookup_type handle 'em.
(decode_type):  Complain about tagndx values on
non-struct/union/enum types, which the EPI compiler tends to produce.

* symtab.c (list_symbols):  Make minimal symbol variable-finding work.

* tm-68k.h (FIX_CALL_DUMMY): Avoid alignment and byte order
dependency.

* elfread.c (elf_symfile_read):  Update bfd_elf_find_section
usage to match new prototype.  Include libbfd.h to get prototype.
1992-06-21 02:20:30 +00:00
Fred Fish 3624c87592 Mostly changes to dbxread.c to preserve stringtab's on a per-objfile
basis, for use in expanding psymtabs to full symtabs.  See ChangeLog
for other details.
1992-03-27 01:04:14 +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 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 be8303da55 * coffread.c (decode_base_type): Pass long, not union.
Fix by Eric Valette, ev@chorus.fr.
1992-02-20 05:25:34 +00:00
Per Bothner 7e258d18e0 Oodles of changes. The most important is adding support for stabs
encapsulated in mips ecoff.  See ChangeLog for the gory details.
1991-12-23 23:16:58 +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
Steve Chamberlain f5f0679af0 Changes due to include file renaming:
* xcoffread.c:	internalcoff.h	->coff/internal.c,
	  		coff-rs6000.h	->coff/rs6000.h
	* mipsread.c:	coff-mips.h	->coff/mips.h
	* elfread.c:    elf-common.h	->elf/common.h
			elf-external.h	->elf/external.h,
			elf-internal.h	->elf/internal.h
	* dwarfread.c	dwarf.h		->elf/dwarf.h
	* dbxread.c:	aout64.h	->aout/aout64.h
			stab.gnu.h	->aout/stab_gnu.h

	* coffread.c:   internalcoff.h	->coff/internal.h
	* buildsym.c:   stab.gnu.h	->aout/stab_gnu.h
	* depend        Updated to take the above into account.
1991-12-01 06:47:23 +00:00
John Gilmore f1d77e9053 Improve G++ debugging support. 1991-11-27 09:43:59 +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 e140f1dab1 Remove tdesc stuff. Remove FRAME_CHAIN_COMBINE from all tm-*.h files,
since it was always defined exactly the same in all of them.
1991-11-18 23:52:12 +00:00
Fred Fish 58ae87f612 Remove internal gdb definition of fixed arg count concat() function and
convert to use of variable arg count concat() in libiberty.
1991-11-12 17:50:14 +00:00
John Gilmore a048c8f537 Add tracking of object files (that contain symbols) to gdb.
This includes a "struct objfile" that owns symtabs and psymtabs
that were read in from that binary file.  See ChangeLog.
1991-11-09 10:50:07 +00:00
Steve Chamberlain 557f4de774 Include coff-m88k.h rather than m88kbcs.h 1991-11-08 02:17:43 +00:00
John Gilmore e64fbb3aa7 * coffread.c: Eliminate c_nsyms in favor of c_naux.
Complain if no auxents on .bf and .ef FCN symbols, and assume
lots of line numbers.
(init_linenos, enter_linenos):  Use a sentinel at the end of the
read-in linenos, to make for a fast, safe loop-end test.
1991-11-07 01:27:46 +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
Stu Grossman 159a075e55 * coffread.c, coredep.c, i386-xdep.c: install patches for
SysV/386 3.2 from Mauro DePalma.
1991-10-25 23:10:12 +00:00
John Gilmore 9bba3334a0 * dbxread.c, coffread.c: static-ize functions that were
gratuitiously external.  (From Fred Fish.)
1991-10-04 06:46:30 +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
John Gilmore cadbb07a69 * core.c (core_file_command): Print frame at coredump with
its level number, by calling print_stack_frame.
* frame.h:  Add selected_frame_level, print_stack_frame.
* frame.h, stack.c:  Remove print_sel_frame, print_selected_frame.
* convex-tdep.c, convex-xdep.c, infcmd.c, inflow.c, infrun.c:
Change print_sel_frame and print_selected_frame callers to
print_stack_frame.

* dbxread.c (read_ofile_symtab):  Avoid empty else clause.
* symfile.c (free_named_symtabs):  Ditto.
* main.c (main):  wrap_here needs an arg.
* solib.c (find_solib):  Avoid memory access if _DYNAMIC is zero.
(solib_add):  Avoid noise.
(solib_create_inferior_hook):  Lint.
(sharedlibrary_command):  Move dont_repeat to here.
* utils.c (error):  Call wrap_here to force buffered output.

Small patches from Peter Schauer:

* coffread.c (start_symtab):  Free any existing line_vector before
malloc-ing new one.
(read_coff_symtab):  Ditto for type_vector.

* source.c (lines_to_list):  New variable, replacing function.
(all uses):  Use as variable.
(_initialize_source):  Add 'set listsize' and 'show listsize'.
* utils.c (lines_to_list):  Remove function.
* stack.c (print_frame_info):  Use as variable.
* defs.h (lines_to_list):  Remove declaration.
1991-09-11 01:49:50 +00:00
Stu Grossman 61a7292f6f lint 1991-08-22 22:50:50 +00:00
John Gilmore 6988f5c0ae Thu Jul 4 14:47:06 1991 John Gilmore (gnu at cygint.cygnus.com)
* configure.in, Makefile.in:  Avoid rebuilding "depend" as much.
        Avoid declaring Makefile dependencies, because GNU Make stupidly
        tries to update it if we do.

        * coffread.c:  Revise for minor changes to bfd internal coff
        indexes.

        * configure:  If -template= is given a relative path, make it
        absolute before recurring in subdirectories.
1991-07-05 00:04:59 +00:00
John Gilmore 99a7de40cb Change GDB over to GNU General Public License version 2. 1991-06-04 07:31:55 +00:00
John Gilmore dcc355360e Update bfd_h_get{short,long} to bfd_h_get{_16,_32} for basic type size
independence.
1991-05-29 00:13:44 +00:00
K. Richard Pixley beff312ea7 configure changes and -opcode.h movement. 1991-05-19 07:27:02 +00:00
John Gilmore 5594d534a2 Saber C (lint) cleanups, and a few bug fixes. See ChangeLog. 1991-05-04 23:15:02 +00:00
Jim Kingdon 8aa13b8777 Make it run on wingnut (88k, DGUX). Complete list of changes in the ChangeLog. 1991-05-03 06:02:03 +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
John Gilmore 639893384d Merge devo/bfd with GDB's bfd.
Get getopt and obstack from -liberty rather than compiling them here.
* coffread.c: turn a printf into a complain(), and try to deal more
gracefully with botched-looking lineno pointers.
* dbxread.c:  Use bfd_get_symcount rather than bfd_get_symcount_upper_bound.
Don't coredump on files with zero symbols in them (a BFD bug showed this one).
* environ.c:  Pass GNUTARGET into the parent (gdb) as well as the child.
1991-05-02 03:39:15 +00:00
Jim Kingdon b203fc1803 * coffread.c (find_linenos): Use LINESZ not sizeof (struct lineno).
* coffread.c (end_symtab): Initialize language, dirname, and
	fullname fields.
1991-04-21 05:17:05 +00:00
Jim Kingdon ab8f22a975 Fix comment (coff-encap -> dbx-in-coff). 1991-04-20 00:41:55 +00:00
Jim Kingdon 8714ff355d * coffread.c (read_coff_symtab): Check for "LF%" with all the
other L*% things.

	* coffread.c (SDB_TYPE): New macro.
	various: Use it instead of checking against T_NULL.
1991-04-19 21:48:55 +00:00
John Gilmore a6e2b4241e * coffread.c (end_psymtab): Free named symtabs and psymtabs for
a file, once a new symtab has been read for it.
        * symtab.h (GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):  New
        defines for the blocks of a blockvector that contain global and
        file-static symbols and the first of the smaller scope contours.
        * symtab.c (lookup_symbol, find_pc_symtab, find_pc_line,
        decode_line_1, make_symbol_completion_list):  Use the above.
        * coffread.c (end_symtab, patch_opaque_types):  Ditto.
1991-04-13 22:29:36 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00
John Gilmore 831c851165 Initial revision 1990-09-05 17:54:31 +00:00
gdb-3.5 7a67dd45ca gdb-3.5 2012-06-03 15:36:32 +01:00
gdb-3.4 1c997a4ae8 gdb-3.4 2012-06-03 15:36:32 +01:00
gdb-3.3 4187119d59 gdb-3.3 2012-06-03 15:36:32 +01:00
gdb-3.1 e91b87a368 gdb-3.1 2012-06-03 15:36:31 +01:00
gdb-2.8.1 bb7592f010 gdb-2.8.1 2012-06-03 15:36:31 +01:00
gdb-2.8 3bf57d2108 gdb-2.8 2012-06-03 15:36:31 +01:00
gdb-2.5.1 632ea0ccc5 gdb-2.5.1 2012-06-03 15:36:30 +01:00
gdb-2.4+.aux.coff 7b4ac7e1ed gdb-2.4+.aux.coff 2012-06-03 15:36:30 +01:00