Commit Graph

300 Commits

Author SHA1 Message Date
Daniel Jacobowitz 84ba0adf42 * buildsym.c (start_subfile): Handle absolute pathnames
while comparing subfile names.
2007-05-14 14:10:35 +00:00
Joel Brobecker 05279ca074 * buildsym.c (record_producer): Do nothing if no producer is provided. 2007-02-27 22:57:42 +00:00
Daniel Jacobowitz cb1df416fb 2007-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz  <dan@codesourcery.com>

	* buildsym.c (end_symtab): Use preallocated symtab if available.
	Fill in SYMBOL_SYMTAB.
	* buildsym.h (struct subfile): Add symtab member.
	* dwarf2read.c (struct dwarf2_cu): Add line_header.
	(struct file_entry): Add symtab.
	(free_cu_line_header): New function.
	(read_file_scope): Use it.  Save line_header in the cu.  Process
	lines before DIEs.
	(add_file_name): Initialize new symtab member.
	(dwarf_decode_lines): Create symtabs for included files.
	(new_symbol): Set SYMBOL_SYMTAB.
	* symtab.c (lookup_symbol): Use SYMBOL_SYMTAB.
	(search_symbols): Likewise.
	* symtab.h (struct symbol): Add symtab member.
	(SYMBOL_SYMTAB): Define.

	* gdb.base/included.c, gdb.base/included.exp,
	gdb.base/included.h: New files.
2007-01-21 16:49:40 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 303b6f5dea * buildsym.c (start_subfile): Handle producer.
(record_producer): New function.
	* buildsym.h (struct subfile): Include producer.
	(record_producer): New prototype.
	* dwarf2-frame.c (struct dwarf2_cie): Add version and augmentation.
	(struct dwarf2_frame_state): Add armcc_cfa_offsets_sf and
	armcc_cfa_offsets_reversed.
	(execute_cfa_program): Handle armcc_cfa_offsets_sf.
	(dwarf2_frame_find_quirks): New function.
	(dwarf2_frame_cache): Call it.  Handle armcc_cfa_offsets_reversed.
	(decode_frame_entry_1): Record the CIE version.  Record the
	augmentation.  Skip armcc augmentations.
	* dwarf2read.c (read_file_scope): Save the producer.
	* symtab.h (struct symtab): Rename unused version member to
	producer.
2007-01-04 20:26:42 +00:00
Daniel Jacobowitz 14711c8202 * buildsym.c (finish_block): Don't adjust the boundaries of
nested functions.
2006-08-25 16:32:32 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Baurzhan Ismagulov 3d263c1d0a 2005-01-29 Baurzhan Ismagulov <ibr@radix50.net>
* ax-gdb.c, ax-general.c, bcache.c, bfd-target.c, bsd-kvm.c,
	* buildsym.c, c-lang.c, c-typeprint.c, c-valprint.c, charset.c,
	* coff-pe-read.c, coffread.c, complaints.c, copying.c: I18n markup.
2005-01-29 17:53:26 +00:00
Paul N. Hilfinger bb599908a8 * language.c (local_hex_format_custom): Remove.
(local_hex_string): Rename to hex_string, use C format, and move to
utils.c
(local_hex_string_custom): Rename to hex_string_custom and change
interface.  Now uses C format.  Move to utils.c
(local_octal_format_custom): Remove.
(local_decimal_format_custom): Remove.
(unknown_language_defn): Remove language-specific number
formatting entries.
(auto_language_defn): Ditto.
(local_language_defn): Ditto.
* language.h (struct language_format_info): Delete declaration.
(struct language_defn): Remove language_format_info fields
la_binary_format, la_octal_format, la_decimal_format, la_hex_format.
(local_binary_format): Remove macro.
(local_binary_format_prefix): Remove macro.
(local_binary_format_specifier): Remove macro.
(local_binary_format_suffix): Remove macro.
(local_octal_format): Remove macro.
(local_octal_format_prefix): Remove macro.
(local_octal_format_specifier): Remove macro.
(local_octal_format_suffix): Remove macro.
(local_decimal_format): Remove macro.
(local_decimal_format_prefix): Remove macro.
(local_decimal_format_specifier): Remove macro.
(local_decimal_format_suffix): Remove macro.
(local_hex_format): Remove macro.
(local_hex_format_prefix): Remove macro.
(local_hex_format_specifier): Remove macro.
(local_hex_format_suffix): Remove macro.
(local_decimal_format_custom): Remove.
(local_octal_format_custom): Remove.
(local_hex_format_custom): Remove.
(local_hex_string): Rename to hex_string and move to defs.h.
(local_hex_string_custom): Rename to hex_string_custom, change
interface, and move to defs.h.
* utils.c: (int_string): New function.
(hex_string): New function (from language.c).
(hex_string_custom): New function (from language.c).
(octal2str): New function.
(decimal2str): Add width parameter.
(paddr_u): Use new decimal2str interface.
(paddr_d): Ditto.
* defs.h (hex_string): Declare.
(hex_string_custom): Declare.
(int_string): Declare.
* printcmd.c (print_scalar_formatted): Remove localized binary
formatting.
* valprint.c (print_longest): Use int_string.
(print_floating): Use C hex format.
(print_hex_chars): Ditto.
(print_binary_chars): Remove language-specific formatting.
(print_octal_chars): Use C octal format.
(print_decimal_chars): Delocalize format.
(print_decimal): Remove.
* ada-lang.c (ada_language_defn): Remove language-specific number
formatting entries.
* p-lang.c (pascal_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* scm-lang.c (scm_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.
* memattr.c (mem_info_command): Use renamed hex_string_custom with
new interface.
* pa64solib.c (pa64_sharedlibrary_info_command): Ditto.
* ui-out.c (ui_out_field_core_addr): Ditto.
* breakpoint.c (breakpoint_adjustment_warning): Ditto.
* exec.c (print_section_info): Ditto.
* i387-tdep.c (print_i387_status_word): Ditto.
(print_i387_control_word): Ditto.
(i387_print_float_info): Ditto.
* maint.c (maint_print_section_info): Ditto.
* solib.c (info_sharedlibrary_command): Ditto.
* somsolib.c (som_sharedlibrary_info_command): Ditto.
* symtab.c (print_msymbol_info): Ditto.
* tracepoint.c (tracepoints_info): Ditto.
* solib-frv.c (lm_base): Ditto.
(frv_current_sos): Ditto.
(enable_break2): Ditto.
(enable_break): Ditto.
* dbxread.c (read_dbx_symtab): Use renamed hex_string.
(process_one_symbol): Ditto.
* infcmd.c (program_info): Ditto.
* mdebugread.c (parse_partial_symbols): Ditto.
* symfile.c (add_symbol_file_command): Ditto.
* cli/cli-cmds.c (edit_command): Ditto.
(list_command): Ditto.
* infcall.c (call_function_by_hand): Ditto.
* remote-vx.c (vx_run_files_info): Ditto.
(vx_wait): Ditto.
(vx_attach): Ditto.
(vx_detach): Ditto.
(vx_kill): Ditto.
* aix-thread.c (pdc_symbol_addrs): Ditto.
(pdc_read_regs): Ditto.
(pdc_write_regs): Ditto.
(pdc_read_data): Ditto.
(pdc_write_data): Ditto.
* d10v-tdep.c (display_trace): Ditto.
* rs6000-nat.c (find_toc_address): Ditto.
* aix-thread.c: Don't include language.h.
* buildsym.c: Ditto.
* dbxread.c: Ditto.
* mdebugread.c: Ditto.
* rs6000-nat.c: Ditto.
* buildsym.c (make_blockvector): Use renamed hex_string.
2004-09-11 10:24:53 +00:00
Elena Zannoni 4a146b47d7 2004-02-07 Elena Zannoni <ezannoni@redhat.com>
* buildsym.c (free_pending_blocks, finish_block)
	(record_pending_block, make_blockvector, end_symtab): Replace
	symbol_obstack with objfile_obstack.
	* coffread.c (process_coff_symbol, coff_read_struct_type)
	(coff_read_enum_type): Ditto.
	* cp-namespace.c (initialize_namespace_symtab)
	(check_one_possible_namespace_symbol): Ditto.
	* dwarf2read.c (new_symbol, dwarf2_const_value, macro_start_file)
	(dwarf2_symbol_mark_computed): Ditto.
	* dwarfread.c (enum_type, new_symbol, synthesize_typedef): Ditto.
	* elfread.c (elf_symtab_read): Ditto.
	* hpread.c (hpread_symfile_init, hpread_symfile_init)
	(hpread_read_enum_type, hpread_read_function_type)
	(hpread_read_doc_function_type, hpread_process_one_debug_symbol):
	Ditto.
	* jv-lang.c (get_java_class_symtab, add_class_symbol)
	(java_link_class_type): Ditto.
	* mdebugread.c (parse_symbol, psymtab_to_symtab_1, new_symtab)
	(new_symbol): Ditto.
	* minsyms.c (install_minimal_symbols): Ditto.
	* objfiles.c (allocate_objfile): Remove init of symbol_obstack.
	(terminate_minimal_symbol_table): Replace symbol_obstack with
	objfile_obstack.
	(free_objfile): Remove freeing of symbol_obstack.
	* objfiles.h: Remove symbol_obstack field.
	* pa64solib.c (add_to_solist): Replace symbol_obstack with
	objfile_obstack.
	* solib-sunos.c (allocate_rt_common_objfile): Remove init of
	symbol_obstack.
	(solib_add_common_symbols): Replace symbol_obstack with
	objfile_obstack.
	* somsolib.c (som_solib_add): Ditto.
	* stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
	(common_block_start, common_block_end): Ditto.
	* symfile.c (reread_symbols): Remove freeing and init of
	symbol_obstack.
	(allocate_symtab): Rename symbol_obstack to objfile_obstack.
	* symfile.h: Update comment.
	* symmisc.c (print_objfile_statistics): Remove symbol_obstack
	stats printing.
	* symtab.c (symbol_set_names): Replace symbol_obstack with
	objfile_obstack.
	* symtab.h (struct general_symbol_info, struct minimal_symbol):
	Update comments.
	* xcoffread.c (read_xcoff_symtab, SYMBOL_DUP, SYMNAME_ALLOC)
	(init_stringtab, xcoff_initial_scan): Replace symbol_obstack with
	objfile_obstack.
2004-02-07 23:13:47 +00:00
Andrew Cagney 41989fcd80 2003-10-06 Andrew Cagney <cagney@redhat.com>
* breakpoint.c, breakpoint.h: Remove obsolete code and comments.
	* buildsym.c, dbxread.c, gdbtypes.c, mdebugread.c: Ditto.
	* monitor.c, sparc-tdep.c, stabsread.c: Ditto.
	* stabsread.h, xcoffread.c: Ditto.
2003-10-06 19:27:13 +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
David Carlton a1632d59e5 2003-09-11 David Carlton <carlton@kealia.com>
* buildsym.c (finish_block): Use allocate_block to allocate the
	block.
	* mdebugread.c (new_block): Add FIXME.
2003-09-11 23:43:56 +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 9219021cb5 2003-04-15 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add cp-namespace.c.
	(COMMON_OBS): Add cp-namespace.o.
	(block.o): Depend on gdb_obstack_h and cp_support_h.
	(buildsym.o): Depend on cp_support_h.
	(cp-namespace.o): New.
	(cp-support.o): Depend on gdb_string_h, demangle_h, gdb_assert_h,
	gdb_obstack_h, symtab_h, symfile_h, and gdbcmd_h.
	(dwarf2read.o): Depend on cp_support_h.
	* jv-lang.c (get_java_class_symtab): Set BLOCK_NAMESPACE.
	* dwarf2read.c (process_die): Set processing_has_namespace_info,
	processing_current_namespace.
	(read_namespace): Update processing_current_namespace; check for
	anonymous namespaces.
	(dwarf2_name): New function.
	(dwarf2_extension): Ditto.
	* cp-support.h: Update copyright, contributors.
	Add inclusion guards.
	Add opaque declaration for structs obstack, block, symbol.
	(struct using_direct): New struct.
	Add declarations for cp_find_first_component,
	cp_entire_prefix_len, processing_has_namespace_info,
	processing_current_namespace, cp_is_anonymous,
	cp_add_using_directive, cp_initialize_namespace,
	cp_finalize_namespace, cp_set_block_scope,
	cp_scan_for_anonymous_namespaces.
	* cp-namespace.c: New file.
	* cp-support.c: Update copyright.
	Include ctype.h, gdb_assert.h, gdbcmd.h.
	New variable maint_cplus_cmd_list.
	(cp_find_first_component): New function.
	(cp_entire_prefix_len, maint_cplus_command)
	(first_component_command, _initialize_cp_support): Ditto.
	* buildsym.c: Include cp-support.h.
	New variable using_list.
	(add_symbol_to_list): Check for anonymous namespaces.
	(finish_block): Set block's scope.
	(start_symtab): Initialize C++ namespace support.
	(end_symtab): Finalize C++ namespace support.
	* block.h: Add opaque declarations for structs
	block_namespace_info, using_direct, and obstack.
	Add declarations for block_set_scope and block_set_using.
	(struct block): Add 'language_specific' member.
	(BLOCK_NAMESPACE): New macro.
	* block.c: Include gdb_obstack.h and cp-support.h.
	(struct block_namespace_info): New struct.
	(block_set_scope): New function.
	(block_set_using, block_initialize_namespace): Ditto.

2003-04-15  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/maint.exp: New file.
2003-04-15 23:07:11 +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 4c2df51b5a Based on a patch from Daniel Berlin (dberlin@dberlin.org).
* symtab.h: Add opaque declarations of struct axs_value and
	struct agent_expr.
	(enum address_class): Add LOC_COMPUTED and LOC_COMPUTED_ARG.
	(struct location_funcs): New type.
	(struct symbol): Add "loc" to aux_value.
	(SYMBOL_LOCATION_BATON, SYMBOL_LOCATION_FUNCS): New macros.
	* dwarf2read.c: Include "dwarf2expr.h".
	(dwarf2_symbol_mark_computed): New function.
	(read_func_scope): Use it.
	(var_decode_location): New function.
	(new_symbol): Use it.
	* dwarf2expr.c, dwarf2expr.h, dwarf2loc.c, dwarf2loc.h: New files.

	* Makefile.in (SFILES): Add dwarf2loc.c and dwarf2expr.c.
	(dwarf2expr_h, dwarf2loc_h): New variables.
	(COMMON_OBS): Add dwarf2expr.o and dwarf2loc.o.
	(dwarf2expr.o, dwarf2loc.o): New rules.
	(dwarf2read.o): Add $(dwarf2expr_h) and $(dwarf2loc_h).
	* buildsym.c (finish_block): Handle LOC_COMPUTED and
	LOC_COMPUTED_ARG.
	* findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
	* m2-exp.y (yylex): Likewise.
	* printcmd.c (address_info, print_frame_args): Likewise.
	* stack.c (print_block_frame_locals, print_frame_arg_vars): Likewise.
	* symmisc.c (print_symbol, print_partial_symbols): Likewise.
	* ada-lang.c (ada_resolve_subexp, symtab_for_sym)
	(ada_add_block_symbols, fill_in_ada_prototype): Likewise.
	* symtab.c (lookup_block_symbol): Likewise.
2003-02-21 15:24:18 +00:00
David Carlton de5ad195ef 2003-02-20 David Carlton <carlton@math.stanford.edu>
* symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME;
	expand comment.
	* ada-lang.c (user_select_syms, ada_finish_decode_line_1): Replace
	SYMBOL_PRINT_NAME with SYMBOL_SOURCE_NAME.
	* ada-typeprint.c (ada_typedef_print): Ditto.
	* ax-gdb.c (gen_var_ref): Ditto.
	* breakpoint.c (print_one_breakpoint): Ditto.
	* buildsym.c (finish_block): Ditto.
	* c-valprint.c (c_val_print): Ditto.
	* expprint.c (print_subexp): Ditto.
	* findvar.c (locate_var_value): Ditto.
	* infcmd.c (jump_command): Ditto.
	* linespec.c (decode_line_2, decode_compound): Ditto.
	* maint.c (maintenance_translate_address): Ditto.
	* objc-lang.c (compare_selectors, compare_classes): Ditto.
	* printcmd.c (build_address_symbolic, sym_info, print_frame_args):
	Ditto.
	* p-valprint.c (pascal_val_print): Ditto.
	* stabsread.c (define_symbol): Ditto.
	* stack.c (print_frame, frame_info, print_block_frame_locals)
	(print_frame_arg_vars, return_command): Ditto.
	* symfile.c (compare_symbols, compare_psymbols): Ditto.
	* symmisc.c (print_symbol): Ditto.
	* symtab.c (lookup_partial_symbol, lookup_block_symbol)
	(compare_search_syms, print_symbol_info, print_msymbol_info)
	(rbreak_command): Ditto.
	* tracepoint.c (tracepoints_info): Ditto.
	* typeprint.c (typedef_print): Ditto.
	* valops.c (value_of_variable, hand_function_call): Ditto.
	* cli/cli-cmds.c (edit_command, list_command): Ditto.
	* ada-typeprint.c: Update Copyright.
	* infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto.
	* tracepoint.c, cli/cli-cmds.c: Ditto.
2003-02-20 17:17:25 +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
Elena Zannoni 25caa7a88b 2003-01-13 Elena Zannoni <ezannoni@redhat.com>
* stabsread.h (process_later, resolve_cfront_continuation):
	Obsolete.
	Update copyright years.
	* buildsym.c (start_subfile): Obsolete comment pertinent to Cfront.
	Update copyright year.
	* dbxread.c(struct cont_elem): Obsolete.
	(process_later, process_now): Obsolete functions.
	(read_dbx_symtab, read_ofile_symtab): Obsolete cfront support.
	Update copyright year.
	* gdbtypes.c (INIT_EXTRA, ADD_EXTRA): Obsolete macros.
	(add_name, add_mangled_type, cfront_mangle_name): Obsolete functions.
	* mdebugread.c (parse_type): Obsolete comment pertinent to Cfront.
	(parse_partial_symbols): Obsolete cfront support.
	* stabsread.c
	(CFRONT_VISIBILITY_PRIVATE,CFRONT_VISIBILITY_PUBLIC): Obsolete
	macros.
	(get_substring, get_cfront_method_physname, msg_unknown_complaint,
	read_cfront_baseclasses, read_cfront_member_functions,
	resolve_cfront_continuation,read_cfront_static_fields,
	copy_cfront_struct_fields): Obsolete functions.
	(define_symbol, read_one_struct_field): Obsolete cfront support.
	* xcoffread.c (scan_xcoff_symtab): Obsolete CFront support.
	Update Copyright year.
2003-01-14 00:15:05 +00:00
Andrew Cagney bde581776e 2003-01-09 Andrew Cagney <ac131313@redhat.com>
* somsolib.h: Fix function indentation.
	* disasm.c, buildsym.c, buildsym.h: Eliminate PTR.
	* gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ.
	* demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ.
	* alpha-osf1-tdep.c, corefile.c: Eliminate STREQ.
	* somsolib.c, inftarg.c: Remove assignment in if conditional.
2003-01-09 18:30:32 +00:00
Andrew Cagney 1b831c9308 2003-01-02 Andrew Cagney <ac131313@redhat.com>
* valarith.c (value_binop): Delete obsolete code and comments.
	* configure.host: Ditto.
	* buildsym.h (make_blockvector): Ditto.
	* buildsym.c (make_blockvector): Ditto.
	* defs.h (enum language): Ditto.
	(chill_demangle): Ditto.
	* elfread.c (elf_symtab_read): Ditto.
	* dwarfread.c (CHILL_PRODUCER): Ditto.
	(set_cu_language): Ditto.
	(handle_producer): Ditto.
	* expprint.c (print_subexp): Ditto.
	* gdbtypes.c (chill_varying_type): Ditto.
	* gdbtypes.h (builtin_type_chill_bool): Ditto.
	(builtin_type_chill_char, builtin_type_chill_long): Ditto.
	(builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
	(chill_varying_type): Ditto.
	* language.h (_LANG_chill): Ditto.
	* language.c (binop_result_type, integral_type): Ditto.
	(character_type, string_type, structured_type): Ditto.
	(lang_bool_type, binop_type_check): Ditto.
	* stabsread.h (os9k_stabs): Ditto.
	* stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
	(define_symbol, read_type, read_struct_fields): Ditto.
	(read_array_type, read_enum_type, read_huge_number): Ditto.
	(read_range_type, start_stabs): Ditto.
	* symfile.c (init_filename_language_table): Ditto.
	(add_psymbol_with_dem_name_to_list): Ditto.
	* symtab.c (symbol_init_language_specific): Ditto.
	(symbol_init_demangled_name, symbol_demangled_name): Ditto.
	* symtab.h (struct general_symbol_info): Ditto.
	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
	* typeprint.c (typedef_print): Ditto.
	* utils.c (fprintf_symbol_filtered): Ditto.
	* valops.c (value_cast, search_struct_field, value_slice): Delete
	obsolete code.
	(varying_to_slice): Delete function.
	* value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
	(varying_to_slice): Delete declaration.
	* MAINTAINERS: Update.
2003-01-02 14:27:27 +00:00
Kevin Buettner 231367095d Replace complain() with complaint(). 2002-12-17 00:39:08 +00:00
Klee Dienes a672ef1326 2002-11-18 Klee Dienes <kdienes@apple.com>
* buildsym.c (pop_context): Add comment.
2002-11-18 20:57:55 +00:00
Klee Dienes 0c5e171aed 2002-11-18 Klee Dienes <kdienes@apple.com>
* buildsym.h (pop_context): Convert to function, defined in
        buildsym.c.
        * buildsym.c: Include gdb_assert.h.
        (pop_context): Implement as C function.  Add check for stack
        underflow.
        * dbxread.c (process_one_symbol): Complain and stop processing
        that symbol if we are already at the top of the context stack for
        a function-end N_FUN (this would imply an umatched RBRAC).  Ditto
        when processing N_RBRAC.
2002-11-18 19:14:10 +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
Michael Snyder c0219d4272 2002-09-10 Michael Snyder <msnyder@redhat.com>
* buildsym.c (finish_block): Protect against null pointer.
2002-09-10 23:45:26 +00:00
Andrew Cagney 822e978b93 2002-08-20 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that the Apollo line was made obsolete.
* configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and
m68*-hp-hpux* obsolete.
* configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*,
m68*-hp-bsd* and m68*-hp-hpux* obsolete.
* buildsym.c (make_blockvector): Make static.
* buildsym.h (make_blockvector): Make extern declaration obsolete.
* Makefile.in (HFILES_NO_SRCDIR): Remove dst.h
(ALLDEPFILES): Remove dstread.c.
(dstread.o): Obsolete make rule.
* dstread.c: Makefile obsolete.
* dst.h: Ditto.
* config/m68k/hp300hpux.mt: Ditto.
* config/m68k/hp300hpux.mh: Ditto.
* config/m68k/hp300bsd.mt: Ditto.
* config/m68k/hp300bsd.mh: Ditto.
* config/m68k/apollo68b.mt: Ditto.
* config/m68k/apollo68v.mh: Ditto.
* config/m68k/apollo68b.mh: Ditto.
2002-08-21 00:57:44 +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
Jim Blandy 99d9066e57 Add macro structures to GDB's symbol tables. Nobody puts anything
in them yet.
* symtab.h (struct symtab): New member: `macro_table'.
* buildsym.h (pending_macros): New global variable.
* buildsym.c: #include "macrotab.h".
(buildsym_init): Initialize `pending_macros'.
(end_symtab): If we found macro information while reading a CU's
debugging info, do build a symtab structure for it.  Make the
symtab point to the macro information, and clear the
`pending_macros' pointer which held it while we were reading the
debug info.
(really_free_pendings): Free any pending macro table.
* objfiles.h (struct objfile): New member: `macro_cache'.
* objfiles.c (allocate_objfile): Set allocate and free functions
for the macro cache's objstack.
(free_objfile): Empty the macro cache's obstack.
* symfile.c (reread_symbols): Empty the macro cache's obstack, and
set new allocate and free functions for it.
* solib-sunos.c (allocate_rt_common_objfile): Set allocate and
free functions for the macro cache's objstack.  (Why is this
function building its own objfile?)
* symmisc.c (print_objfile_statistics): Print statistics on the
macro bcache.
* Makefile.in: Note that buildsym.o depends on macrotab.h.
2002-05-15 21:19:21 +00:00
Andrew Cagney 14a5e76714 * language.c (local_hex_string_custom): Simplify. Do not depend
on PRINTF_HAS_LONG_LONG or CC_HAS_LONG_LONG.

* memattr.c (mem_info_command): Replace calls to
longest_local_hex_string and longest_local_hex_string_custom.
* buildsym.c (make_blockvector): Ditto.
* solib.c (info_sharedlibrary_command): Ditto.
* tracepoint.c (tracepoints_info): Ditto.
* symtab.c (print_msymbol_info): Ditto.

* language.c (local_hex_string): Delete.
(local_hex_string_custom): Delete.
(longest_local_hex_string): Rename to local_hex_string.
(longest_local_hex_string_custom): Rename to
local_hex_string_custom.
* language.h (local_hex_string): Change parameter type to LONGEST.
(local_hex_string_custom): Ditto.
(longest_local_hex_string): Delete declaration.
(longest_local_hex_string_custom): Ditto.

* solib.c: Update copyright.
* memattr.c: Update copyright.
2002-05-12 04:20:06 +00:00
Daniel Jacobowitz d7f0b9ce2d 2002-01-20 Daniel Jacobowitz <drow@mvista.com>
* buildsym.c: Update copyright years.
	* c-typeprint.c: Likewise.
	* dwarf2read.c: Likewise.
	* f-typeprint.c: Likewise.
	* gdbtypes.c: Likewise.
	* gdbtypes.h: Likewise.
	* hp-symtab-read.c: Likewise.
	* hpread.c: Likewise.
	* mdebugread.c: Likewise.
	* p-typeprint.c: Likewise.
2002-01-20 19:42:04 +00:00
Daniel Jacobowitz 8176bb6dee 2002-01-15 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct type): Fix whitespace.  Remove obsolete
	comment.  Add ``artificial'' to ``union field_location''.

	* dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL.

	* buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (define_symbol): Likewise.
	* hp-symtab-read.c (hpread_function_type): Likewise, instead of
	initializing TYPE_FIELD_BITPOS to n (obsolete).
	(hpread_doc_function_type): Likewise.
	* hpread.c (hpread_function_type): Likewise.
2002-01-20 19:12:23 +00:00
Daniel Jacobowitz e88c90f2c5 2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* symtab.h (struct block): (ALL_BLOCK_SYMBOLS): New macro.

        * symtab.c (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
        (make_symbol_completion_list): Likewise.
        (make_symbol_overload_list): Likewise.
        * buildsym.c (finish_block): Likewise.
        * breakpoint.c (get_catch_sals):  Likewise.
        * mdebugread.c (mylookup_symbol): Likewise.
        * objfiles.c (objfile_relocate): Likewise.
        * printcmd.c (print_frame_args): Likewise.
        * stack.c (print_block_frame_locals): Likewise.
        (print_block_frame_labels): Likewise.
        (print_frame_arg_vars): Likewise.
        * symmisc.c (dump_symtab): Likewise.
        * tracepoint.c (add_local_symbols): Likewise.
        (scope_info): Likewise.

2001-10-12  Daniel Jacobowitz  <drow@mvista.com>

        * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS.

2001-10-12  Daniel Jacobowitz  <drow@mvista.com>

        * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS.
        * generic/gdbtk-stack.c (gdb_block_vars): Likewise.
        (gdb_get_blocks): Likewise.
        (gdb_get_vars_command): Likewise.
5~
2001-10-12 23:51:30 +00:00
Eli Zaretskii d5166ae11e * buildsym.c (start_subfile): Use FILENAME_CMP instead of STREQ.
(top-level): #include filenames.h.

	* dwarf2read.c (dwarf2_start_subfile): Use IS_ABSOLUTE_PATH and
	FILENAME_CMP, to DTRT on non-Posix platforms.
	(top-level): #include filenames.h.
2001-04-30 10:30:27 +00:00
Fernando Nasser 063fd66879 2001-04-06 Fernando Nasser <fnasser@redhat.com>
* buildsym.c (record_line): Turn off unused addr bits.
2001-04-06 13:14:55 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner e1e9e218c1 Replace calls to abort() with calls to internal_error(). 2001-02-25 04:45:12 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Daniel Berlin 357e46e7c9 C++ improvements 2000-06-05 20:49:53 +00:00
Andrew Cagney 91b9ff2179 Include "expression.h" which "language.h" depends on. 2000-02-21 03:04:19 +00:00
Andrew Cagney f7cb3ef862 Include "language.h" for longest_local_hex_string_custom(). 2000-02-21 02:51:07 +00:00
Jim Blandy 59527da01e * buildsym.h (add_free_pendings): Declare.
* buildsym.c (add_free_pendings): New function.
(make_blockvector): 32x64 fix using longest_local_hex_string().
(start_subfile): initialize variable 'subfile'.
2000-02-18 22:15:46 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +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
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 552316ee17 * buildsym.h, buildsym.c: Convert to ANSI-only. 1999-02-01 00:38:25 +00:00
Stan Shebs 8523b5f36d * buildsym.h, buildsym.c: Reformat to standard. 1999-01-31 23:57:18 +00:00
Stan Shebs f3cc3e6e6d * buildsym.c (merge_symbol_lists): Remove unused variable.
(_initialize_buildsym): Remove, does nothing.
1999-01-31 23:29:13 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Andrew Cagney 60a98b30b4 CARP:
* buildsym.c (end_symtab): Cleanup PROCESS_LINENUMBER_HOOK.
1998-11-20 00:00:24 +00:00
Ron Unrau f85d9973b3 * partial-stab.h: 'F' and 'f' type N_FUN psymbols should pass
CUR_SYMBOL_VALUE as CORE_ADDR instead of long
        * buildsym.[ch]: export pending_blocks list
	* tm-txvu.h: define TARGET_READ_SP and TARGET_WRITE_SP
	* txvu-tdep.c: rewrite symtabs to support N_FUN symbols in overlays.
	  (Actually, the last version did this for N_SLINE symbols).
	  (txvu_read_sp,txvu_write_sp): new
1998-06-14 14:48:27 +00:00
Jeff Law f109cc3d9e Minor comment fix. 1997-10-22 18:28:25 +00:00
Stu Grossman 45a70ed653 * The following block of changes add support for debugging assembly
source files.
	* breakpoint.c (resolve_sal_pc):  Prevent crash when pc isn't
	associated with a function.
	* buildsym.c (record_line start_symtab end_symtab):  Don't delete
	symtabs which only have line numbers (but no other debug symbols).
	* dbxread.c (read_dbx_symtab end_psymtab):  Ditto.

	* remote-sim.c:  New functions gdbsim_insert/remove_breakpoint.  Use
	intrinsic simulator breakpoints if available, otherwise do it the
 	hard way.
	* configure.tgt:  Add d30v.
	* d30v-tdep.c:  New file.
	* config/d30v/d30v.mt, config/d30v/tm-d30v.h:  New files.
1997-09-25 01:26:36 +00:00
Dawn Perchik d719efc6d5 * dbxread.c, buildsym.c, symtab.c, stabsread.c: Add support for
reading stabs extensions for live range information.
	* stabsread.h, partial-stab.h: Add prototypes for new functions.
	* symtab.h: Add structure for storing live range information.
1997-09-08 00:38:19 +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
Per Bothner b57d4d17d6 Change FIXME comment - should replace bubble sort by merge sort, not qsort. 1997-04-17 21:32:25 +00:00
Mark Alexander 32dab60312 * remote-mips.c (common_breakpoint): Prevent 64-bit addresses
from being sent to 32-bit targets by masking off upper bits.
	* mips-tdep.c (heuristic_proc_start): Mask off upper 32 bits
	of PC on 32-bit targets.
	(mips16_heuristic_proc_desc): Recognize 'addiu s1,sp,n' as a
	frame setup instruction.
	(mips32_heuristic_proc_desc): Fix warning found by gcc -Wall.
	(mips16_skip_prologue): Recognize 'addiu s1,sp,n' as a valid
	prologue instruction.  Fix warnings and bugs found by gcc -Wall.
	* buildsym.c (finish_block): Improve handling of overlapping blocks;
	fixes problem on MIPS16 printing function arguments.
1997-02-09 17:36:49 +00:00
Mark Alexander d883102448 * mdebugread.c (parse_partial_symbols): Fix 64-bit
sign-extension problems in calculating psymtab addresses.
	* buildsym.c (end_symtab): Use macro to pop context.
1996-10-22 01:26:20 +00:00
Stu Grossman ac9548059b * buildsym.c (finish_block): Treat LOC_BASEREG_ARG and
LOC_LOCAL_ARG as arguments so that GDB will know about function
	args declared this way.  Mostly affects dwarf.
	* dwarfread.c (decode_die_type):  Change default type from int to
	void.  This allows GDB to recognize void functions.
	* (new_symbol):  If AT_PROTOTYPED is present, set a flag in the
	type structure.
	* findvar.c (extract_floating store_floating):  Clean up comments
	to reflect reality.
	* gdbtypes.h:  Add TYPE_FLAG_PROTOTYPED so that we can tell if a
	function has a prototype.  Currently, only dwarf supports this.
	* utils.c (floatformat_from_doublest):  Fix logic error with
	converting from double to float.  (It wasn't shifting mant_long if
	it had a hidden bit.)

	* v850-tdep.c:  Add support for function calling.  Fix some
	problems with debugging code w/o debug symbols.
	* config/v850/tm-v850.h:  Ditto.
1996-10-15 23:44:13 +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
Fred Fish 7336948874 * buildsym.c (finish_block): Change innerblock_anon_complaint to
print the addresses as part of the complaint.  Add a complaint for
	cases where the block end address is smaller than the block start
	address, in case any such conditions slip through our fixup mechanism.
	* symmisc.c (dump_symtab): Only print blockvector for primary
 	symtabs, to avoid massive duplication of output due to secondary
 	symtabs that point to same blockvector.  Also do some minor
	formatting tweaks.
1996-10-07 17:58:56 +00:00
Fred Fish c1d58bcded * remote-pa.c (boot_board): Add dummy params to make type compatible
for passing to add_com.
	* scm-exp.c (scm_lreadr): Ensure svalue is not used uninitialized.
	* buildsym.c (compare_line_numbers): Change function to match
	prototype and also what qsort expects.
1996-08-13 04:27:08 +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
Peter Schauer b1027aa458 * symtab.h (enum address_class): Add LOC_UNRESOLVED for
a location whose address has to be resolved via the minimal
	symbol table.
	* buildsym.c (finish_block), findvar.c (symbol_read_needs_frame,
	read_var_value), printcmd.c (address_info),
	symmisc.c (print_symbol, print_partial_symbol):  Handle
	LOC_UNRESOLVED.
	* stabsread.c (scan_file_globals):  Change unresolved LOC_STATIC
	symbols to LOC_UNRESOLVED. Remove rt_common_objfile lookup
	kludge, global common symbols are now handled by LOC_UNRESOLVED.
	(scan_file_globals_1):  Move code back to scan_file_globals,
	delete.
1995-10-28 11:57:02 +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
Fred Fish 6b14af2bc6 * dache.c (struct dcache_block): Change data member from unsigned char
to char, since everything passed in and out of dcache is char or casted
	to appropriate type anyway.
	(dcache_alloc):  Move assignment of db out of test and combine separate
	tests into if-else.
	(dcache_peek_byte):  Change ptr from unsigned char* to char*.
	(dcache_peek_byte):  Remove now unnecessary cast in read_memory call.
	(dcache_peek):  Change cast of incoming data arg.
	(dcache_poke):  Change cast of addr of incoming data arg.
	(dcache_info):  Mask data passed to printf_filtered to lsbyte only.
	(dcache_info):  Change printf_filtered arg from "% 2x" to " %2x".
	* target.c (debug_to_thread_alive): Change return type to int and
	return zero, for type compatibility with other *_thread_alive funcs.
	(cleanup_target): Change cast of ignore function to match type of the
	to_thread_alive member.
	* defs.h (error_hook): Add ATTR_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN):  Switch from volatile to
	__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
	* remote.c (remote_wait):  Cast first arg to strtol, strchr, and strncmp
	to "const char *" from "unsigned char *".
	(remote_wait):  Cast arg to putpkt and strcpy from "unsigned char *" to
	"char *".
	(remote_wait):  Change printf format for long arg from "%d" to "%ld".
	(getpkt):  Remove unused variable "bp".
	(remote_fetch_word, remote_store_word):  Ifdef out apparently unused
	functions.
	* breakpoint.c (watchpoint_check):  Removed unused variables
	"saved_level" and "saved_frame".
	* valops.c (value_arg_coerce):  Add other enum TYPE_CODE_* and
	default cases to switch for completeness.
	* infrun.c (wait_for_inferior):  Enclose "have_waited" label
	in #ifdef that matches the one in which it is referenced.
	* ser-unix.c (hardwire_noflush_set_tty_state):  Enclose otherwise
	unused variable "state" in #ifdef that matches one in which it is
	referenced.
	* eval.c (evaluate_subexp_standard):  Remove unused variable "var".
	* eval.c (evaluate_subexp_standard):  Remove unused variable "tmp_symbol".
	* valarith.c (value_subscript):  Remove unused variable "lowerbound",
	which is redeclared in a nested scope prior to use.
	* printcmd.c (print_frame_nameless_args):  Use "%ld" to print long
	arg, not "%d".
	* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
	Remove unused static var "check_break_insn_size".
	* buildsym.c (finish_block):  Add other enum LOC_* and default
	cases to switch for completeness.
	ch-lang.c (type_lower_upper):  Removed unused label "retry".
	Add other enum TYPE_* and default cases to switch for completeness.
	* f-typeprint.c (f_type_print_args):  Ifdef out unused function
	that may be used someday when Fortran support is complete.
	* ch-valprint.c (chill_print_type_scalar):  Add other enum
	TYPE_* and default cases to switch for completeness.
	(chill_val_print):  Remove unused local var "high_bound" that
	is redeclared in a nested scope prior to use.
	(chill_var_print):  Use "%ld" to print long arg, not "%d".
	* regex.c (re_compile_fastmap, re_match_2):  Add remaining enum types
	and default to switches for completeness.
	* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
	"trampoline_symbol".
	(prim_record_minimal_symbol_and_info):  Return NULL rather than trash.
	* elfread.c (elf_symtab_read):  Don't dereference NULL returns from
	record_minimal_symbol_and_info.
	* f-lang.c (saved_function_list_end):  Ifdef out unused variable
	that may be used someday.
	* f-valprint.c (f_val_print):  Remove unused local variable "straddr".
1995-07-18 04:38:06 +00:00
Peter Schauer b9e585030c * buildsym.c (patch_subfile_name): Update last_source_file
with the real source file name.
	* dbxread.c (end_psymtab):  Handle static functions in the
	SOFUN_ADDRESS_MAYBE_MISSING case by passing pst->filename
	to lookup_minimal_symbol.
	(process_one_symbol):  Ignore extra outermost context from
	SunPRO cc and acc.
	* stabsread.c (define_symbol):  Do not complain for SunPRO
	static variable encoding if STATIC_TRANSFORM_NAME is defined.
	* sparc-tdep.c, config/sparc/tm-sun4sol2.h
	(sunpro_static_transform_name):  Renamed from
	solaris_static_transform_name.
	* config/sparc/tm-sun4os4.h (STATIC_TRANSFORM_NAME):
	Define to sunpro_static_transform_name for acc 3.0 compiled
	executables.
	* procfs.c, config/alpha/nm-osf2.h (PROCFS_DONT_TRACE_FAULTS):
	Renamed from PROCFS_DONT_TRACE_IFAULT, don't trace any faults
	if defined.
	* procfs.c (info_proc_siginfo):  Cast sip->si_addr to
	`unsigned long' and use `lx' format for printing it.
1995-03-25 09:23:10 +00:00
Per Bothner 27202b6a47 * buildsym.c (finish_block): If finishing a function without known
parameter type info, set that from parameter symbols.
	* c-typeprint.c (c_type_print_varspec_suffix):  For TYPE_CODE_FUNC,
	print parameter types, if available.
	* ch-typeprint.c (chill_type_print_base):  Likewise.

	* gdbtypes.h (struct type):  Remove function type field.
	(TYPE_FUNCTION_TYPE):  Remove macro.  We can't as simply re-use
	function types now that we're also storing parameter types.
	And the payoff is much less.
	* gdbtypes.c (make_function_type):  Don't use/set TYPE_FUNCTION_TYPE.
	(recursive_dump_type):  Don't print TYPE_FUNCTION_TYPE.
	* dwarfread.c (read_subroutine_type):  Don't set TYPE_FUNCTION_TYPE.
1995-02-12 18:46:45 +00:00
Jim Kingdon 21af55c92d * buildsym.c (start_subfile): Set language for f2c like for cfront. 1995-02-12 17:53:34 +00:00
Jim Kingdon bb6247c6b2 * buildsym.c (start_subfile, patch_subfile_names), demangle.c
(set_demangling_style, set_demangling_command): Use savestring not
	strdup.  We were not dealing properly with a NULL return from
	strdup, and were not declaring strdup (the system header may or
	may not have it).
1994-03-26 04:26:26 +00:00
Jim Kingdon 833e0d94cc Fix many sins which will come up in 32 bit x 64 bit GDB, and
various miscellaneous things discovered in the process:
	* printcmd.c, defs.h (print_address_numeric): New function.
	* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
	breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
	cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
	printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
	Use it.
	* utils.c, defs.h (gdb_print_address): New function.
	* expprint (dump_expression), gdbtypes.h: Use it.
	* breakpoint.c (describe_other_breakpoints),
	symmisc.c (dump_symtab, print_symbol):
	Use filtered not unfiltered I/O.
	(remove_breakpoints): Remove BREAKPOINT_DEBUG code.  Might as well
	just run gdb under a debugger for this (and it had problems with
	printing addresses, how to print b->shadow, etc.).
	* buildsym.c (make_blockvector), core.c (memory_error),
	exec.c (print_section_info), maint.c (print_section_table),
	mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Add comments saying code is broken.  Marked with "FIXME-32x64".
	* dbxread.c (process_one_symbol), partial-stab.h (default),
	remote-vx.c (vx_run_files_info):
	Don't cast int being passed to local_hex_string.
	* symmisc.c (print_symbol): Don't cast long being passed to %lx.
	* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
	only being a long.
	* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
	and LOC_LOCAL.
	* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
	* source.c: Include <sys/types.h> regardless of USG.
1994-01-27 00:36:05 +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 f91b837dd0 * buildsym.c (finish_block): If we pop the context stack and it is
not empty, complain () instead of abort ().
1993-10-18 15:40:04 +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
Jim Kingdon 8b05f64a70 * symfile.c (deduce_language_from_filename): Accept .cxx for C++.
* buildsym.c (start_subfile): Use deduce_language_from_filename
	rather than checking for .C or .cc ourself.
1993-09-21 17:41:45 +00:00
K. Richard Pixley fee933f19c gcc lint 1993-09-08 21:30:33 +00:00
Jim Kingdon 996ccb3043 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,
symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c
	partial-stab.h, symmisc.c, gdbtypes.c: Lint.  Remove (or put
	inside #if) unused variables and labels.  Fix unclosed comment.
	Deal with enumeration values unhandled in switch statements.  Make
	sure non-void functions return values.  Include appropriate
	headers.
	* dbxread.c (elfstab_build_psymtabs): Don't check for unsigned
	value < 0.
1993-09-02 01:41:40 +00:00
Jim Kingdon be7d4f3f6d * symtab.c (find_pc_line, find_line_common),
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-02 00:24:46 +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
Stan Shebs 48f075eb2a Moved the function hashname from stabsread.c to buildsym.c, since
it's a general-purpose function.
1993-08-09 23:49:18 +00:00
Jim Kingdon 56ad756a85 * buildsym.c (start_subfile): If a .c file includes a .C file, set
the language of both of them to C++.
1993-07-28 00:22:08 +00:00
Jim Kingdon 3c02636b4e * Clean up xcoff relocation.
objfiles.h (struct objfiles): Add section_offsets, num_sections.
	symfile.c (syms_from_objfile), xcoffread.c (xcoff_symfile_offsets):
	Set them.
	symtab.h (struct general_symbol_info): Add section field.
	minsyms.c (prim_record_minimal_symbol{,_and_info}): Set it.
	xcoffread.c: Set section for symbols and msymbols.
	(struct symtab): Add block_line_section field.
	buildsym.c (end_symtab): Set it.
	(end_symtab and callers): Add section parameter.
	objfiles.c (objfile_relocate): New funciton.
	xcoffexec.c (vmap_symtab): Use it.
	xcoffsolib.h (struct vmap): Remove unused fields.
	config/rs6000/tm-rs6000.h, stack.c, xcoffexec.c: Remove
	CORE_NEEDS_RELOCATION, symtab_relocated.
	config/rs6000/tm-rs6000.h: Remove use of loadinfotext.
	rs6000-tdep.c: Make loadinfotext static.
	breakpoint.c (fixup_breakpoints): Doc fix.
	symtab.h (struct symtab), config/rs6000/tm-rs6000.h, buildsym.c
	(end_symtab): primary field replaces nonreloc.
1993-03-26 14:59:43 +00:00
John Gilmore 7c622b4105 * remote.c: Improve error recovery. Allow user to break out
of initial connection attempt with INTERRUPT.  Treat a timeout
while waiting for remote packet like a retry, unless the remote
side is actively running user code.  Fix a few long printf_filtered's.

* xcoffread.c (read_xcoff_symtab):  Don't use null symbol name for
trampoline symbols.

* buildsym.c (start_subfile):  Allow null file name.
1993-02-16 05:16:55 +00:00
Fred Fish 2e4964adfc * defs.h (STRCMP, STREQ, STREQN): New macros.
* defs.h (demangle_and_match):  Remove prototype.
	* dwarfread.c (STREQ, STREQN):  Remove macros, replaced with STREQ
	  and STREQN defined in defs.h.
	* dwarfread.c (set_cu_language):  For completely unknown languages,
	  try to deduce the language from the filename.  Retain behavior
	  that for known languages we don't know how to handle, we use
	  language_unknown.
	* dwarfread.c (enum_type, symthesize_typedef):  Initialize language
	  and demangled name fields in symbol.
	* dwarfread.c, mipsread.c, partial-stab.h:  For all usages of
	  ADD_PSYMBOL_TO_LIST, add language and objfile parameters.
	* dwarfread.c (new_symbol):  Attempt to demangle C++ symbol names
	  and cache the results in SYMBOL_DEMANGLED_NAME for the symbol.
	* elfread.c (STREQ):  Remove macro, use STREQ defined in defs.h.
	  Replace usages throughout.
	* elfread.c (demangle.h):  Include.
	* elfread.c (record_minimal_symbol):  Remove prototype and function.
	* gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES,
	  B_CLRALL):  Moved from symtab.h to gdbtypes.h.
	* infcmd.c (jump_command):  Remove code to demangle name and add
	  it to a cleanup list.  Now just use SYMBOL_DEMANGLED_NAME.
	* minsyms.c (demangle.h):  Include.
	* minsyms.c (lookup_minimal_symbol):  Indent comment to match code.
	* minsyms.c (install_minimal_symbols):  Attempt to demangle symbol
	  names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME.
	* mipsread.c (psymtab_language):  Add static variable.
	* stabsread.c (demangle.h):  Include.
	* stabsread.c (define_symbol):  Attempt to demangle C++ symbol
	  names and cache them in the SYMBOL_DEMANGLED_NAME field.
	* stack.c (return_command):  Remove explicit demangling of name
	  and use of cleanups.  Just use SYMBOL_DEMANGLED_NAME.
	* symfile.c (demangle.h):  Include.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):  Fix
	  to match macros in symfile.h and allow them to be compiled
	  if INLINE_ADD_PSYMBOL is not true.
	* symfile.h (INLINE_ADD_PSYMBOL):  Default to true if not set.
	* symfile.h (ADD_PSYMBOL_*):  Add language and objfile parameters.
	  Add code to demangle and cache C++ symbol names.  Use macro form
	  if INLINE_ADD_PSYMBOL is true, otherwise use C function form.
	* symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	  Remove, also defined in symfile.c, which we already fixed.
	* symtab.c (expensive_mangler):  Remove prototype and function.
	* symtab.c (find_methods):  Remove physnames parameter and fix
	  prototype to match.
	* symtab.c (completion_list_add_symbol):  Name changed to
	  completion_list_add_name.
	* symtab.c (COMPLETION_LIST_ADD_SYMBOL):  New macro, adds both
	  the normal symbol name and the cached C++ demangled name.
	* symtab.c (lookup_demangled_partial_symbol,
	  lookup_demangled_block_symbol):  Remove prototypes and functions.
	* symtab.c (lookup_symbol):  Remove use of expensive_mangler,
	  use lookup_block_symbol instead of lookup_demangled_block_symbol.
	  Remove code to try demangling names and matching them.
	* symtab.c (lookup_partial_symbol, lookup_block_symbol):
	  Fix to try matching the cached demangled name if no match is
	  found using the regular symbol name.
	* symtab.c (find_methods):  Remove unused physnames array.
	* symtab.c (name_match, NAME_MATCH):  Remove function and macro,
	  replaced with SYMBOL_MATCHES_REGEXP from symtab.h.
	* symtab.c (completion_list_add_symbol):  Rewrite to use cached
	  C++ demangled symbol names.
	* symtab.h:  Much reformatting of structures and such to add
	  whitespace to make them more readable, and make them more
	  consistent with other gdb structure definitions.
	* symtab.h (general_symbol_info): New struct containing fields
	  common to all symbols.
	* symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME,
	  SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME,
	  SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE):  New macros.
	* symtab. (struct minimal_symbol, struct partial_symbol, struct
	  symbol): Use general_symbol_info struct.
	* utils.c (demangle_and_match):  Remove, no longer used.
	* valops.c (demangle.h):  Include.
	* xcoffexec.c (eq):  Remove macro, replace usages with STREQ.
	* blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c,
	  infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c,
	  symmisc.c, symtab.c, valops.c:  Replace references to minimal
	  symbol fields with appropriate macros.
	* breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c,
	  coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c,
	  demangle.c, elfread.c, energize.c, environ.c, exec.c,
	  gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c,
	  main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c,
	  remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c,
	  sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c,
	  symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h,
	  tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c:  Replace strcmp
	  and strncmp usages with STREQ, STREQN, or STRCMP as appropriate.
	* breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c,
	  mipsread.c, printcmd.c, source.c, stabsread.c, stack.c,
	  symmisc.c, tm-29k.h, valops.c, values.c:  Replace SYMBOL_NAME
	  references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as
	  appropriate.
	* buildsym.c (start_subfile, patch_subfile_names):  Default the
	  source language to what can be deduced from the filename.
	* buildsym.c (end_symtab):  Update the source language in the
	  allocated symtab to match what we have been using.
	* buildsym.h (struct subfile):  Add a language field.
	* c-typeprint.c (c_print_type):  Remove code to do explicit
	  demangling.
	* dbxread.c (psymtab_language):  Add static variable.
	* dbxread.c (start_psymtab):  Initialize psymtab_language using
	  deduce_language_from_filename.
1992-12-23 06:34:57 +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
John Gilmore 9b280a7f53 RS/6000 portability changes (for hosting cross-debuggers).
* breakpoint.c (fixup_breakpoints):  Re-kludge to IBM6000_TARGET.
* buildsym.c, rs6000-xdep.c, rs6000-tdep.c, tm-rs6000.h,
xcoffexec.c, xcoffread.c:  Rename aixcoff to xcoff everywhere.
* printcmd.c (print_frame_args):  Remove an RS/6000 dependency.
* stabsread.c (define_symbol):  Remove RS/6000 dependencies.
* tm-rs6000.h (ATTACH_DETACH):  Remove: host-dependent.
(PTRACE_ATTACH, PTRACE_DETACH):  Remove: host-dep.
(NO_SINGLE_STEP):  Add, target-dependent.
(loadinfotextindex):  Lowercase, remove "aix_".
* xm-rs6000.h:  Add <sys/ptrace.h> for infptrace.c.
(NO_SINGLE_STEP):  Remove, target-dependent.
* xcoffexec.c (vmap_symtab):  Cleanup #if 0'd code.
* xcoffread.c:  Only build file if RS/6000 native GDB.
(build_function_symbol):  Remove #if 0'd code.
* rs6000-tdep.c:  Cleanup.  Add static fn protos.
Use CORE_ADDR for addresses throughout.  Make void fns void.
(pop_dummy_frame):  Add FIXME about bogosity of design here.
(rs6000_struct_return_address):  Ditto.
(frameless_function_invocation, frame_get_cache_fsr,
frame_initial_stack_address, xcoff_relocate_symtab,
xcoff_init_loadinfo, free_loadinfo, xcoff_add_toc_to_loadinfo,
add_text_to_loadinfo, find_toc_address):  Move from xdep file.
Use CORE_ADDRs.  Change identifiers to lowercase.

* rs6000-xdep.c:  Make whole file conditional on native RS/6000,
supplying dummy routines if non-native.  Add prototype for
static exec_one_dummy_insn.  Move a mess of functions to
rs6000-tdep.c (as above).  Remove #if 0'd code.

* config/rs6000.mh (XDEPFILES):  Move xcoffexec.o to target side.
(XM_CLIBS):  Add -lm to circumvent AIX 3.2 libc ldexp bug.
* config/rs6000.mt (TDEPFILES):  Adopt xcoffexec.o.
1992-08-29 00:32:58 +00:00
Fred Fish 7b5d965008 * buildsym.c (end_symtab): Document that end_symtab can return
NULL under non-error conditions.
 	* dwarfread.c (read_file_scope):  Guard against dereferencing NULL
 	returned from end_symtab for empty compilation units.
1992-08-12 18:17:48 +00:00
Fred Fish 3416d90bd6 * buildsym.c (start_subfile): Compact dirname initialization.
* buildsym.c (patch_subfile_names):  New function.
	* buildsym.c (end_symtab):  Make copy of dirname on symbol obstack.
	* buildsym.c (end_symtab):  Free all malloc'd subfile fields.
	* buildsym.h (patch_subfile_names):  Add prototype.
	* dbxread.c (process_one_symbol):  Call patch_subfile_names.
1992-08-06 19:59:46 +00:00
Fred Fish 8275e802a7 * buildsym.c (end_symtab): Make copy of dirname on symbol obstack. 1992-08-06 17:58:26 +00:00
Fred Fish cd46ffad4e * dwarfread.c (struct dieinfo): Remove obsolete at_visibility,
at_import, at_frame_base.
	* dwarfread.c (completedieinfo):  Remove cases for obsolete
	AT_visibility, AT_import, and AT_frame_base attributes.
	* breakpoint.h (BREAKPOINT_MAX):  Increase from 10 to 16 for
	i860, which can keep up to 4 shadow breakpoints.
	* tm-stratus.h (USG):  Define.
	* tm-stratus.h (TARGET_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (HOST_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (xm-sysv4.h):  Include, name changed from xm-svr4.h.
	* xm-stratus.h (NO_JOB_CONTROL):  Remove define.
	* config/stratus.mt (TDEPFILES):  Include files available from
	stratus that are not yet in release pending receipt of paperwork
	at FSF.
	* buildsym.c (finish_block):  Minor code format change.
	* gdbtypes.h (struct field):  Add to comments.
	* gdbtypes.h (virtual_field_bits):  Add to comments.
	* objfiles.c (allocate_objfile):  Change obstack interface to
	match FSF merging efforts.
1992-08-01 20:40:59 +00:00
Fred Fish d07734e31f * Makefile.in (VERSION): Bump to 4.6.2.
* Makefile.in (SFILES_MAINDIR):  Add stabsread.c
	* Makefile.in (OBS):  Add stabsread.o
	* Makefile.in (stabsread.o):  Add build rule.
	* stabsread.c, stabsread.h:  New files.
	* buildsym.c:  Split out stabs specific support to stabsread.c.
	* buildsym.h:  Split out stabs specific support to stabsread.h.
	* dbxread.c (stabsread.h):  Include
	* dbxread.c (dbx_new_init):  Call stabsread_new_init.
	* dbxread.c (dbx_psymtab_to_symtab_1):  Call stabsread_init.
	* dbxread.c (read_ofile_symtab):  Call end_stabs.
	* dbxread.c (process_one_symbol):  Call end_stabs and start_stabs.
	* dbxread.c (elfstab_build_psymtabs):  Call stabsread_new_init.
	* dwarfread.c (psymtab_to_symtab_1):  Call buildsym_init, add
	really_free_pendings to cleanups.
	* elfread.c (elf_new_init):  Call stabsread_new_init.
	* gdbtypes.c:  Small changes to maintenance commands.
	* mipsread.c (stabsread.h):  Include.
	* mipsread.c (psymtab_to_symtab_1):  Call end_stabs.
	* xcoffread.c (stabsread.h):  Include.
	* xcoffread.c (global_stabs):  Remove redundant def.
	* xcoffread.c (read_xcoff_symtab):  Call start_stabs and end_stabs.
1992-07-28 04:22:18 +00:00
Fred Fish c0f1085b5a * buildsym.c (read_struct_type): Initialize structs allocated
with alloca, to avoid using random values from stack later on.
	* defs.h (fprintf_filtered):  Add prototype.
	* gdbtypes.c (check_stub_method):  Fix misleading comments.
	* gdbtypes.c (print_arg_types, dump_fn_fieldlists):  New maint
	support functions.
	* gdbtypes.c (print_cplus_stuff, recursive_dump_type):  Many
	small changes to maint support functions.
	* gdbtypes.h (cplus_struct_type):  Reorganize member ordering
	for some fields and expand comments.
	* objfiles.c (allocate_objfile):  Use new obstack_alloc_arg
	macro and track change to obstack_full_begin macro.
	* utils.c (fprintfi_filtered):  New function.
	* valprint.c (type_print_base):  Fixup field printing to not
	print extraneous lines and not print bogus "no data fields"
	messages for C++ classes with no data members.  Also use new
	fprintfi_filtered function.
1992-07-21 04:14:34 +00:00
Ken Raeburn 23c156a2ad Don't die on TYPE_CODE_UNDEF nodes as base classes.
(Previous checkin died due to cvs bug.)
1992-07-14 21:33:39 +00:00
Per Bothner 5c5b5d4b0e Various fixes to improve C++ debugging. See ChangeLog. 1992-07-10 03:56:17 +00:00
Fred Fish 8050a57b2c * dwarfread.c (alloc_utype, decode_subscr_data): Call alloc_type
to create new blank types, instead of handcrafting them.
	* defs.h (printfi_filtered):  Add prototype.
	* utils.c (printfi_filtered):  New function.
	* gdbtypes.c (recursive_dump_type):  Use printfi_filtered to
	to simplify the code.  Other cleanups.
	* gdbtypes.c (check_stub_method):  Demangle using DMGL_ANSI.
	* gdbtypes.h (struct cplus_struct_type):  Add comments describing
	use of various fields.
	* gdbtypes.c (print_bit_vector, print_cplus_stuff):  New functions.
	* c-exp.y (%token):  Add CLASS as a token for C++, add grammar
	production that currently treats it exactly the same as STRUCT.
	* c-exp.y (yylex):  Recognize "class" as token CLASS.
	* symtab.c (gdb_mangle_name):  Rewrite to match current g++ stabs.
	* symtab.c (decode_line_1):  Fix to pass quoted args on down to
	general symbol handling code.  Call cplus_mangle_opname with
	DMGL_ANSI.
	* symtab.c (decode_line_2):  Print demangled function names in
	breakpoint menus, instead of just file and line number.
	* symtab.c (name_match):  Call cplus_demangle with DMGL_ANSI.
	* valprint.c (type_print_base):  Print "class" for C++ classes,
	rather than "struct".  Print section labels for public, protected
	and private members of C++ classes.
	* values.c:  Include demangle.h.
	* values.c (value_headof):  Call cplus_demangle with DMGL_ANSI.
1992-07-09 04:40:39 +00:00
John Gilmore ec8ceca3f3 * buildsym.c (finish_block): Fix thinko `inner block' complaints.
* dbxread.c (process_one_symbol):  Parse N_OPT "gcc2_compiled.".
* procfs.c (proc_set_exec_trap): Set run-on-last-close flag on
child processes, to avoid dead ones "hanging around" after GDB exits.
(attach): Always stop the process if it needs it.  Set RLC flag
when attaching running processes, so it will continue if we detach
it, quit, or are killed.
(detach):  Clear faults and set RLC flag to make process run
when we close it.
(open_proc_file):  New `mode' argument for O_RDONLY or O_RDWR.
Callers changed.
(info_proc):  Open process O_RDONLY, so we can see any process,
even those controlled by debuggers.
* tm-sun4sol2.h (SUN_FIXED_LBRAC_BUG):  They did (in Sol 2).
1992-07-05 10:26:53 +00:00
John Gilmore 76512886f9 Tidy innerblock_complaint and blockvector_complaint. 1992-07-04 12:23:23 +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
John Gilmore 4c7c6bab1f * dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.
* partial-stab.h:  Ignore N_ENDM.
* elfread.c (elf_symtab_read):  Ignore symbols that don't have a
CODE or DATA section attachment.  This eliminates a lot of random
values from shared libraries, which screw up the ordinary symbols
in the address ranges they happen to overlap.
* buildsym.c (define_symbol):  Eliminate special tests
for function types; move into "function" cases in switch statement.
(define_symbol: 'f', 'F', 'P'):  Process all parameter types
in case they define new type numbers.  But ignore them (FIXME).
('k', 'B'):  Ignore const and volatile if we see them (FIXME).
(read_sun_builtin_type):  Add commentary.
1992-07-03 07:08:31 +00:00
John Gilmore 0f552c5fc6 * buildsym.c (scan_file_globals): Beware the null file.
Fix from Jim Williams.

* stack.c (return_command):  Evaluate expression *before* popping
off the stack frames!  Fix inspired by Jim Williams.
(up_silently_command, down_silently_command):  No sel frame is error.

* defs.h (memcpy, memset):  Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca):  Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset):  Declare, and set MEM_FNS_DECLARED.

* mips-tdep.c (heuristic_proc_start):  Zero arg produces zero.
* utils.c (fputs_demangled):  Rename SLOP since DECstation system
header files define it!
1992-06-30 08:53:28 +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
Stu Grossman 50a11e4933 * buildsym.c (read_sun_builtin_type): Handle new FCS Sun CC
compiler feature of putting 'c' into basic type descriptors for
all forms of char.
1992-06-25 22:35:09 +00:00
Fred Fish 4341615d92 * valprint.c (type_print_1): Plug memory leak. Print all
C++ syms as demangled, not just functions.
 	* buildsym.c (read_range_type):  When we find a signed char
 	type, do a lookup of signed char, not plain char.  Plain char's
 	still get looked up as plain char's elsewhere.
1992-06-19 02:43:22 +00:00
John Gilmore 2778e91584 * buildsym.c (define_symbol): Nameless types are now on several
platforms; generalize them and un-ifdef them to make Solaris 2
work.
1992-06-15 08:47:56 +00:00
John Gilmore 0dce456e8d Lint 1992-06-13 05:56:15 +00:00
John Gilmore 93297ea028 * buildsym.h: Add processing_acc_compilation flag.
* buildsym.c (read_sun_builtin_type, read_sun_floating_type):  New.
(define_symbol):  Skip arg types in function entries.  Resolve
overloaded 'P' which acc uses for prototypes of functions called
by this file.
(read_type: 'b', 'r'):  Handle Solaris2 builtin types.

* minsyms.c (prim_record_minimal_symbol_and_info):  Hack to
save size of ELF symbols.  FIXME.
* tm-sun4os5.h:  Rename to tm-sun4sol2.h.  Update defines for Sol2.
* xm-sun4os5.h:  Rename to xm-sun4sol2.h.  Hack more defines.

* config/sun4os5.m[ht]:  Rename to config/sun4sol2.m[ht]; new xm, tm.
1992-06-13 02:18:44 +00:00
John Gilmore ea1549b346 * gdbtypes.c (make_{reference,pointer,function}_type): New
functions which handle overwriting of forward-referenced types
for stabs file reading.
(lookup_{reference,pointer,function}_type):  These just call
the make_*_type functions with a null storage alloc parameter.
* gdbtypes.h (make_{reference,pointer,function}_type):  Declare.
* xcoffread.c (smash_to_pointer_type):  Remove, no longer used.

* buildsym.c (dbx_lookup_type):  Zero result for (-1,-1) arg.
(dbx_alloc_type):  Make it easier to understand.  No funct change.
(define_symbol: 't'):  Don't put the typedef name into the name of
the struct, union, or enum.  Bugfix.
(read_type: '*', '&', 'f'):  Add comments.  Use make_XXX_type
routines to properly handle overwriting preallocated types so that
forward references will work.
(read_enum_type):  Force enum values to file scope, due to bug in
Sun compiler output.  FIXME, fix later.

Remove unused header_file_prev_index mechanism.  It was already
obsolete in gdb-3.5.  These comments appeared in 3.5:
  /* This code was used before I knew about the instance codes.
     My first hypothesis is that it is not necessary now
     that instance codes are handled.  */
* dbxread.c (add_new_header_file):  Remove header_file_prev_index.
* buildsym.h:  Remove it and prev_index that saves it.
* buildsym.c (push_subfile, pop_subfile, start_symtab):  Remove it.

* solib.c (special_symbol_handling):  When called from core files,
must set up debug_addr.  Don't print error messages, just return.
* symmisc.c (print_symbol):  Less ascii diarrhea for enums, please.
1992-05-01 09:14:43 +00:00
Per Bothner 9b6f92dbfd buildsym.c: Fix parameter mis-match.
Check in ChangeLog (forgotten last night).
1992-04-09 20:36:20 +00:00
Per Bothner 095db7ce45 Changes from metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).
* buildsym.c  (#ifdef RS6000_TARGET):  Don't create unnecessary
	symbols for nameless types.  And, handle `R' (register parameter
	type) for AIX.  (an extension to existing stabstring grammar).
	* rs6000-xdep.c:  Fix typo (= should have been ==).
1992-04-09 07:57:10 +00:00
John Gilmore 03c93c664d * buildsym.c (read_struct_type): Avoid coredump when C++
abbreviated type name is messed up.  Reported by Joe Buck.
FIXME, we need to determine whether GDB or GCC needs to be
smarter to correctly locate this type name.   p*927 circumvention,
needs real fix when Tiemann's back.
1992-04-02 11:56:14 +00:00
John Gilmore 84ffdec2cb Create and use macros for iterating on symtabs, psymtabs, msymbols.
* minsyms.c (iterate_over_msymbols):  Remove; clunky and slow.
* symfile.h, symtab.h (iterate_over_msymbols):  Remove prototype
* coffread.c (coff_symfile_read):  iterate_over_symtabs => ALL_SYMTABS.
(patch_opaque_types):  Avoid dummy args and result.
* objfiles.c (have_partial_symbols, have_full_symbols,
have_minimal_symbols):  explicit iteration => ALL_OBJFILES; simplify.
(iterate_over_objfiles, iterate_over_symtabs,
iterate_over_psymtabs):  Remove, clunky and slow.
* objfiles.h:  Replace iterate_over_* prototypes with ALL_SYMTABS,
ALL_PSYMTABS, and ALL_MSYMBOLS macros.
* symmisc.c (dump_symtab, dump_psymtab, dump_msymbols,
dump_objfile):  Remove dummy args and results.  Move filename
comparisons to callers.
(printsyms_command, printpsyms_command, printmsyms_command,
printobjfiles_command):  iterate_over_* => ALL_*.  Compare filenames.
* symtab.c (lookup_symtab_1, lookup_symtab, lookup_partial_symtab,
lookup_symbol, find_main_psymtab, find_pc_symtab, sources_info,
list_symbols, make_symbol_completion_list):  Replace explicit
iteration with ALL_SYMTABS, ALL_PSYMTABS, or ALL_MSYMBOLS.
Eliminate Dijkstra flag crap, break out of loops with gotos.
(lookup_symtab_1):  Protect '/' tests from short filenames.
(cplus_mangled_symbol):  Move inline into lookup_symbol.
* xcoffexec.c (relocate_objfile_msymbols):  Remove poor hack.
(relocate_minimal_symbol):  Move inline to vmap_symtab.
(vmap_symtab):  Replace iteration with ALL_OBJFILES,
iterate_over_msymbols with ALL_MSYMBOLS.

Misc cleanup prior to release.

* dwarfread.c (dwarf_build_psymtabs):  Remove mainline test.
* mipsread.c (compare_symtabs, compare_psymtabs):  Remove, unused.
* mipsread.c:  Add prototypes for all static functions.

* symmisc.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
dump_blockvector, dump_block, dump_addrchass, dump_namespace,
dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove, unused.
* xcoffread.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
dump_blockvector, dump_block, dump_addrchass, dump_namespace,
dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove 2nd
unused copy!

* buildsym.c (define_symbol):  Handle global register variables
(from Pierre Willard).  Complain if register numbers are too large.
1992-03-29 23:17:36 +00:00
Per Bothner 1eeba68641 Merged in latest RS6000 diffs from Metin G. Ozisik. 1992-03-29 22:33:35 +00:00
John Gilmore c2e4669f8c Misc cleanups from code review. 1992-03-27 23:56:15 +00:00
Michael Tiemann be1384b056 Fixed a place where dbx symbol name continuation was appearing in an
unexpected place, causing the `Trace' type in gperf/main.o to be
mis-parsed.
1992-03-24 15:28:40 +00:00
Fred Fish 5e2e79f859 Many changes, most related to creating entry point information on a per-objfile
basis.  See comments in objfiles.h and details in ChangeLog.  Also remove
redundant definitions of FRAME_CHAIN_VALID from most of the tm-* files and
use a default definition in frame.h.
1992-03-21 01:56:01 +00:00
Michael Tiemann d747e0af3d Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)
* All GDB files that #include defs.h: Removed stdio.h.
	(defs.h): #include stdio.h.

This has been tested by building GDBs for all targets hosted on Sun4.
None of the build problems were related to stdio.h inclusion.  (n.b.
many configurations don't build for other reasons.)
1992-03-03 23:26:26 +00:00
Per Bothner 6c6afbb92b More changes, mostly from IBM for rs6000. (See ChangeLog.) 1992-03-02 01:55:31 +00:00
Per Bothner 2b5a8d9c47 More changes, mostly from IBM, for the rs6000. See ChangeLog. 1992-03-01 01:04:13 +00:00
Per Bothner 818de002b6 Mostly rs6000 changes from IBM. 1992-02-29 06:03:43 +00:00
John Gilmore 93fe4e330e Saberlint.
* symmisc.c, xcoffread.c:  Move debug functions to symmisc.c.
1992-02-22 09:16:11 +00:00
John Gilmore 1ab3bf1b14 * Check in Fred Fish's changes in these modules. Fred
will make ChangeLog entries for all of them.
1992-02-22 01:46:16 +00:00
John Gilmore 256269fc92 * buildsym.c (read_struct_type): Avoid double-bump of parse ptr
in the op$::OPERATOR. case.  From Steven McCanne, <mccanne@horse.ee.lbl.gov>.
1992-02-07 16:23:57 +00:00
John Gilmore 5a4e721505 * buildsym.c (read_struct_type): Circumvent sun3 sunos "--" compiler bug.
* c-exp.y (yylex):  `this' and `template' are only tokens in C++.
* target.c (target_xfer_memory):  Return errno in preference to EIO.
1992-01-27 22:10:05 +00:00
Michael Tiemann 0eb0a82097 Fix demangling of destructors, and fix a minor indentation problem. 1992-01-20 16:55:45 +00:00
Stu Grossman 59d97f7fd7 buildsym.c (cleanup_undefined_types): Add support for enums.
This fixes the 'GDB internal error.  cleanup_undefined_types with
bad type' problem.
1992-01-07 21:16:25 +00:00
Per Bothner aab77d5f23 More changes, mostly cleanups from the last set.
Made some more progress in removing duplicate assembly opcode files.
More improvements to how mipsread and to a lesser extent dbxread work.
See the ChangeLog for details.
1991-12-27 21:11:37 +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
Michael Tiemann 7fb4dfc05d Integrated quick fixes to C++ handling of static member functions and
stub methods.  These changes are not complete in that a better
implementation will be more maintainable, but they make it possible to
debug groff with GDB.
1991-12-09 05:20:14 +00:00
Fred Fish c8d9eb8e43 Supply missing parenthesis (~line 1269). 1991-12-05 18:53:46 +00:00
John Gilmore 2a5ec41d88 Fix things pointed up by Fred Fish's test suite; see ChangeLog. 1991-12-05 11:56:20 +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 3ae444f844 SCO lint. 1991-11-22 20:44:50 +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
Michael Tiemann 572acbbedc Make changes needed to handle code which uses ANSI-mangled names (and
new G++ 1.95 dbxout output).
1991-11-18 00:32:34 +00:00
Per Bothner 0e2a896cf5 Fixes related to handling of C++ methods (handle destructors
and parameters that are functions).
1991-11-12 22:20:02 +00:00
John Gilmore 74f6fb084c * Makefile.in: Add xcoffread.c, xcoffexec.c.
* xcoffread.c:  New file for handling AIX mangled-coff files.
* xconfig/rs6000, tconfig/rs6000:  New files.
* buildsym.c:  Add hooks for xcoffread.c.
1991-11-12 15:54:27 +00:00
John Gilmore 19405dda98 Remove Rs/6000 changes (patch_block_stabs) so it will link without. 1991-11-09 11:16:47 +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
Per Bothner abefb1f107 * infrun.c: Fixed typo in comment.
* utils.c:  All the v*fprintf emulation is now in libiberty,
	so we can get rid of some junk.
	* xm-sun3os4.h, xm-sun4os4.h, xconfig/decstation, xconfig/i386sco,
	xconfig/sun3os4, xconfig/sun4os4: Don`t need HAVE_STRSTR any more.
	* m68k-pinsn.c (print_insn_arg):  Support BB/BW/BL
	type operands, as used by branch instructions.
	* gmalloc.c: Fix prototype of memcpy.
	* elfread.c: Comment out register_addr, since it conflicts
	with the one in coredep.c.
	* buildsym.h:  Remove extern declarations of two functions
	that are really static in buildsym.c.
	* tm-mips.h: Add symbolic names for more registers.
	* mips-xdep.c (store_inferior_registers): Use new register names.
	* xm-mips.h: Simplify REGISTER_U_ADDR, since it is now
	only used for core files, not ptrace.  Therefore,
	the KERNEL_U_ADDR hack is no longer needed.
	The mapping to ptrace number is now in in mips-xdep.c.
	* mips-xdep.c:  Define REGISTER_PTRACE_ADDR (using the
	mapping from the old REGISTER_U_ADDR), and use it
	in {fetch,store}_inferior_registers.
	* mipsread.c: Rename #include ecoff.h to new name coff-mips.h.
	* mips-tdep.c (mips_push_dummy_frame, mips_pop_frame):
	Save/restore FP regs correctly (?).
	* dbxread.c: Remove duplicate define_symbol and type_synonym_name
	(these had been previously moved to buildsym.c).
	Hence, define_symbol becomes extern instead of static.
	* buildsym.c (read_struct_type):  Comment out bogus handling
	of C++ operator methods.  Minor hacking of reading of class
	contexts. Make define_symbol non-static, so dbxread.c can call it.
1991-11-04 23:15:31 +00:00
John Gilmore 4137c5fc0d * buildsym.c: Break out initial malloc sizes.
(record_line):  Record directly in a subfile.  Alloc on demand.
(compare_line_numbers):  Add from xcoffread.c.
(end_symtab):  New params say whether to sort pendings and
linetable.  Patch block stabs if defined.  Shrink linetable before
allocating the symtab.
* buildsym.h:  Delete line_vector* and prev_line_number.  Add
global_stabs and file_stabs for xcoffread.
* dbxread.c (start_subfile):  Move to buildsym.  Change above calls.
* symtab.h:  LINETABLE(symtab) can now be null.  Zap LINELIST.
* symmisc.c, symtab.c:  Cope with null LINETABLEs.
1991-10-27 22:26:02 +00:00
John Gilmore c030245775 Break out symbol-table-building routines
from dbxread.c, so they can be shared with xcoffread.c.
1991-10-26 07:21:30 +00:00