Commit Graph

62 Commits

Author SHA1 Message Date
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
Andrew Cagney 4efb68b1ad 2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
	* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
	* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
	* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
	* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
	* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
	* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
	* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 15:55:53 +00:00
Joel Brobecker 68b8d23eb2 * hpread.c (set_namestring): New procedure replacing the
SET_NAMESTRING macro.
        (hpread_build_psymtabs): Replace calls to SET_NAMESTRING
        by calls to set_namestring.
2003-01-12 11:49:14 +00:00
Joel Brobecker 1fb309eaa6 * hpread.c (SET_NAMESTRING): Remove an incorrect cast to fix
a compilation warning.
       (hpread_process_one_debug_symbol): Likewise.
2003-01-11 02:13:23 +00:00
Joel Brobecker 3269bcfa1c * hpread.c (hpread_process_one_debug_symbol): Fix a small
compilation error in the previous revision.
2003-01-10 15:39:10 +00:00
Daniel Jacobowitz 1e69823536 gdb/
* buildsym.h (processing_hp_compilation): Remove obsolete variable.
	* gdbarch.sh Remove include of "value.h" in gdbarch.h.
	(COERCE_FLOAT_TO_DOUBLE): Remove.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* Makefile.in: Remove value_h from gdbarch_h.
	* valops.c (coerce_float_to_double): New variable.
	(default_coerce_float_to_double): Remove.
	(standard_coerce_float_to_double): Remove.
	(value_arg_coerce): Use coerce_float_to_double.
	(_initialize_valops): Add "set coerce-float-to-double".
	* value.h (default_coerce_float_to_double): Remove prototype.
	(standard_coerce_float_to_double): Remove prototype.

	* hpread.c (hpread_process_one_debug_symbol): Mark C++ functions as
	prototyped.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (define_symbol): Mark all functions as prototyped.

	* hppa-tdep.c (hppa_coerce_float_to_double): Remove.
	* alpha-tdep.c (alpha_gdbarch_init): Remove call to
	set_gdbarch_coerce_float_to_double.
	* arm-tdep.c (arm_gdbarch_init): Likewise.
	* frv-tdep.c (frv_gdbarch_init): Likewise.
	* h8300-tdep.c (h8300_gdbarch_init): Likewise (commented out).
	* i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.
	(mips_coerce_float_to_double): Remove.
	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
	(rs6000_coerce_float_to_double): Remove.
	* s390-tdep.c (s390_gdbarch_init): Likewise.
	* sh-tdep.c (sh_gdbarch_init): Likewise.
	(sh_coerce_float_to_double): Remove.
	* sparc-tdep.c (sparc_gdbarch_init): Likewise.
	(sparc_coerce_float_to_double): Remove.
	* v850-tdep.c (v850_gdbarch_init): Likewise.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
	* config/m32r/tm-m32r.h (COERCE_FLOAT_TO_DOUBLE): Remove.
	* config/pa/tm-hppa.h: (COERCE_FLOAT_TO_DOUBLE): Remove.
	(hppa_coerce_float_to_double): Remove prototype.
	* config/sparc/tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Remove.
doc/
	* gdb.texinfo (Controlling GDB): Add ABI section.  Document
	"set coerce-float-to-double".
	* gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation.
testsuite/
	* gdb.base/callfuncs.exp: Don't XFAIL unprototyped functions for
	stabs.
	* gdb.base/completion.exp: Allow marker1(void) as well as marker1().
	* gdb.base/whatis.exp: Always allow (void) after function names.
2003-01-04 22:37:49 +00:00
Kevin Buettner 231367095d Replace complain() with complaint(). 2002-12-17 00:39:08 +00:00
Joel Brobecker 504d5c7e6a * somsolib.c (dld_cache): Replace boolean by int for field is_valid.
Fixes a build failure on HP/UX.

       * hpread.c (told_objfile): Replace boolean type by int. Fixes a build
       failure on HP/UX.
       (hpread_has_name): Advance declaration to avoid a compilation warning.
       (pst_syms_count): Add missing variable type. By change, the compiler
       was defaulting to int, which seems a good choice. Fixes a compilation
       warning.
       (pst_syms_size): Likewise.
2002-12-03 00:13:45 +00:00
Daniel Jacobowitz 01ad7f3617 * gdbtypes.h (struct main_type): Move artificial flag out of
loc.  New member of ``struct field'' named static_kind.  Reduce
	overloaded meaning of bitsize.
	(FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR)
	(TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise.
	(FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros.

	* ada-lang.c (fill_in_ada_prototype): Initialize static_kind for
	new fields.
	(template_to_fixed_record_type, template_to_static_fixed_type)
	(to_record_with_fixed_variant_part): Likewise.
	* coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise.
	* dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise.
	* dwarfread.c (struct_type, enum_type): Likewise.
	* hpread.c (hpread_read_enum_type)
	(hpread_read_function_type, hpread_read_doc_function_type)
	(hpread_read_struct_type): Likewise.
	* mdebugread.c (parse_symbol): Likewise.
2002-11-11 00:55:34 +00:00
Andrew Cagney 72367fb45b 2002-10-25 Andrew Cagney <cagney@redhat.com>
* complaints.h (struct deprecated_complaint): Rename `struct
	complaint'.
	* complaints.c (complain): Update.
	* remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
	incorrect comment indicating that "symfile.h" was being included
	for the `struct complaint' definition.
	* remote-vx.c: Update.
	* objc-lang.c: Update.
	* xcoffread.c: Update.
	* hpread.c: Update.
	* mdebugread.c: Update.
	* stabsread.c: Update.
	* dwarf2read.c: Update.
	* dwarfread.c: Update.
	* elfread.c: Update.
	* coffread.c: Update.
	* stabsread.h: Update.
	* dbxread.c: Update.
	* buildsym.c: Update.
	* gdbtypes.c: Update.
	* macrotab.c: Update.
2002-10-25 22:25:55 +00:00
Elena Zannoni 407caf07a4 2002-10-21 Elena Zannoni <ezannoni@redhat.com>
* symtab.h (address_class):  Rename
	LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
	* hpread.c (hpread_process_one_debug_symbol): Ditto.
	* printcmd.c (address_info): Ditto.
	* findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
2002-10-21 14:55:18 +00:00
Andrew Cagney 8249c0d6ec From 2002-08-01 david carlton <carlton@math.stanford.edu>:
* hpread.c (hpread_read_struct_type): Deleted superfluous setting
of FIELD_BITSIZE.
2002-08-04 19:11:12 +00:00
Daniel Jacobowitz ad2f7632f9 2002-06-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
        (struct main_type): Remove arg_types member.  Update comments for
        struct field.
        (TYPE_ARG_TYPES): Remove.
        (TYPE_FN_FIELD_ARGS): Update.
        (smash_to_method_type): Update prototype.

        * c-typeprint.c (cp_type_print_method_args): Take method type
        instead of argument list.  Use new argument layout.  Simplify.
        (c_type_print_args): Use new argument layout.  Simplify.
        (c_type_print_base): Update call to cp_type_print_method_args.
        * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
        argument; use die->type instead.  Update call to
        smash_to_method_type.
        (read_structure_scope): Update call to dwarf2_add_member_fn.
        * gdbtypes.c (allocate_stub_method): Update comment.
        (smash_to_method_type): Take new NARGS and VARARGS arguments.
        Use new argument layout.
        (check_stub_method): Use new argument layout.  Don't count
        void as an argument.
        (print_arg_types): Update comments.  Use new argument layout.
        (recursive_dump_type): Don't print arg_types member.
        * hpread.c (hpread_read_struct_type): Use new argument layout.
        (fixup_class_method_type): Likewise.
        (hpread_type_lookup): Likewise.
        * stabsread.c (read_type): Update calls to read_args and
        smash_to_method_type.
        (read_args): Use new argument layout.  Simplify.
        * valops.c (typecmp): Use new argument layout.  Update parameters
        and comments.  Simplify.
        (hand_function_call): Use new argument layout.
        (search_struct_method): Update call to typecmp.
        (find_overload_match): Use new argument layout.
2002-06-14 14:34:26 +00:00
Daniel Jacobowitz 4272591028 2002-05-16 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct cplus_struct_type): Remove args field.
        * hpread.c (hpread_read_struct_type): Remove assignments to args.
        (fixup_class_method_type): Likewise.
2002-05-16 03:59:58 +00:00
Daniel Jacobowitz 2fdde8f831 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE.
        (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use
        TYPE_INSTANCE_FLAGS.
        (struct main_type): New.
        (struct type): Move most members to struct main_type.  Change
        cv_type and as_type to new type_chain member.  Add instance_flags.
        (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros.
        (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove.
        (finish_cv_type): Remove prototype.
        * gdbtypes.c (alloc_type): Update comment.  Allocate TYPE_MAIN_TYPE.
        Set TYPE_CHAIN.
        (alloc_type_instance): New function.
        (smash_type): New function.
        (make_pointer_type, make_reference_type, make_function_type)
        (smash_to_member_type, smash_to_method_type): Call smash_type.
        (make_qualified_type): New function.
        (make_type_with_address_space): Call make_qualified_type.
        (make_cv_type): Likewise.
        (finish_cv_type): Remove unnecessary function.
        (replace_type): Update comment.  Copy TYPE_MAIN_TYPE.
        (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS;
        remove TYPE_CV_TYPE and TYPE_AS_TYPE.
        * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS.
        * dwarf2read.c (read_structure_scope): Don't call finish_cv_type.
        * hpread.c (hpread_read_struct_type): Likewise.
        * stabsread.c (read_struct_type): Likewise.

2002-05-14  Daniel Jacobowitz  <drow@mvista.com>

        * gdb.base/maint.exp (maint print type): Update for new type
        structure.
2002-05-14 18:30:53 +00:00
Daniel Jacobowitz 0004e5a2cf 2002-05-13 Daniel Jacobowitz <drow@mvista.com>
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
        (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref)
        (gen_address_of, gen_struct_ref, gen_repeat): Use type
        access macros.
        * c-typeprint.c (cp_type_print_method_args): Likewise.
        (c_type_print_args): Likewise.
        * d10v-tdep.c (d10v_push_arguments): Likewise.
        (d10v_extract_return_value): Likewise.
        * expprint.c (print_subexp): Likewise.
        * gdbtypes.c (lookup_primitive_typename): Likewise.
        (lookup_template_type, add_mangled_type, print_arg_types): Likewise.
        * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB)
        (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE)
        (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS)
        (TYPE_VECTOR): Likewise.
        * hpread.c (hpread_read_struct_type)
        (fix_static_member_physnames, fixup_class_method_type)
        (hpread_type_lookup): Likewise.
        * mdebugread.c (parse_symbol, parse_type): Likewise.
        * p-lang.c (is_pascal_string_type): Likewise.
        * valops.c (hand_function_call): Likewise.
        * x86-64-tdep.c (classify_argument): Likewise.

        * hpread.c (hpread_read_function_type)
        (hpread_read_doc_function_type): Call replace_type.
        * dstread.c (create_new_type): Delete.
        (decode_dst_structure, process_dst_function): Call alloc_type.
        Use type access macros.
2002-05-13 14:00:36 +00:00
Elena Zannoni 9a6f53fe3b 2002-04-29 Elena Zannoni <ezannoni@redhat.com>
* hpread.c (DNTT_TYPE_VECTOR): Rename from TYPE_VECTOR.
	(DNTT_TYPE_VECTOR_LENGTH): Rename from TYPE_VECTOR_LENGTH.
	(hpread_symfile_init, hpread_lookup_type): Substitute throughout.
2002-04-30 02:06:25 +00:00
Pierre Muller 2b9848d845 2002-04-24 Pierre Muller <ics.u-strasbg.fr>
* hpread.c (hpread_psymtab_to_symtab_1,
	hpread_psymtab_to_symtab): Replace fprintf (stderr,...)
	with fprintf_unfiltered (gdb_stderr,...).
2002-04-29 11:08:26 +00:00
Andrew Cagney 2f4150cc14 * hpread.c (hpread_getlntt): Add declaration.
Also fix PR gdb/391.
2002-04-15 04:52:08 +00:00
Elena Zannoni 8af51c360e 2002-01-23 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (hpread_h): Delete.
        (HFILES_NO_SRCDIR): Remove hpread.h.
        (ALLDEPFILES): Remove hp-psymtab-read.c and hp-symtab-read.c.
        (hpread.o): Update dependencies.
        (hp-psymtab-read.o, hp-symtab-read.o): Remove.

        * hp-psymtab-read.c: Remove file.
        * hp-symtab-read.c: Remove file.
        * hpread.h: Remove file.

        * hpread.c: Merge all contents of hp-psymtab-read.c,
        hp-symtab-read.c and hpread.h into this file, as it was prior to
        January 1999.

        * config/pa/hpux11w.mh, config/pa/hpux11.mh,
        config/pa/hpux1020.mh, config/pa/hppaosf.mh,
        config/pa/hppahpux.mh, config/pa/hppabsd.mh (NATDEPFILES):
        Remove hp-psymtab-read.o and hp-symtab-read.o, add hpread.o.
2002-01-24 03:44:10 +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
Andrew Cagney aac7f4eaf2 mfree() -> xmfree(). 2001-12-02 22:38:23 +00:00
Fred Fish 4dc13854e5 2001-11-06 Fred Fish <fnf@redhat.com>
* complaints.c (info_verbose): Remove unneeded decl, is in defs.h.
	* dbxread.c: Ditto
	* dwarf2read.c: Ditto.
	* dwarfread.c: Ditto.
	* exec.c: Ditto.
	* hpread.c: Ditto.
	* hpread.h: Ditto.
	* mdebugread.c: Ditto.
	* os9kread.c: Ditto.
	* stack.c: Ditto.
	* symfile.c: Ditto.
	* tracepoint.c: Ditto.
2001-11-06 23:38:15 +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
J.T. Conklin 8e1a459b89 * gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,
mips-tdep.c, monitor.c, regcache.c, remote-es.c, ser-unix.c,
somread.c, tracepoint.c: Fix spelling errors in comments.
* gdbarch.c: Regenerate.

* gnu-nat.c (S_exception_raise_request): Fix typos and spelling
errors in strings.
* m3-nat.c (intercept_exec_calls, mach_thread_parse_id): Likewise.
* mcore-tdep.c (mcore_analyze_prologue): Likewise.
* mips-tdep.c (mips16_next_pc, _initialize_mips_tdep): Likewise.
* remote-e7000.c (e7000_start_remote): Likewise.
* remote-rdp.c (handle_swi): Likewise.
* remote-vx.c (vx_load_command): Likewise.
* sh-tdep.c (sh_do_pseudo_register): Likewise.
* sol-thread.c (td_err_string): Likewise.
* symtab.c (decode_line_2): Likewise.
-------------------------------------------------------------------
2000-10-30 21:50:58 +00:00
Kevin Buettner 44c75fb368 Call end_symtab() with SECT_OFF_TEXT (objfile). 2000-10-24 21:13:08 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 74b7792f0f Purge (almost) make_cleanup_func. 2000-05-22 09:02:23 +00:00
Elena Zannoni b8fbeb1874 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
        SECT_OFF_RODATA): Define as functions of OBJFILE.  Add
        sect_index_text, sect_index_data, sect_index_rodata,
        sect_index_bss to objfile structure.
        * gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
        SECT_OFF_RODATA): Remove.
        * objfiles.c (allocate_objfile): Initialize
        sect_index_{text,data,bss,rodata} to -1, for error detection.

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

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

        * xcoffread.c: Add new field objfile to find_targ_sec_arg.
2000-05-04 16:52:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 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
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Andrew Cagney 4dbdbfc4d3 o Fix code deleting psymtab entry from objfile's list.
Only worked if the first element in the list was
	being deleted.
o	When MAINLINE (reading main objectfile and need to
	clear out old data), change elfread.c so that the
	psymbol table is emptied once (in elf_symfile_read)
	instead of multiple times in each *_read_psymtab
	function.
o	For elf_symfile_read, load dwarf2 symbols last
	(so that they are searched for first).
o	In mdebug_psymtab_read, delete check to see if
	symbols for current source file already loaded.
	Test doesn't work for .h files.  Above change
	works better
1997-12-17 16:50:18 +00:00
Jeff Law c031a0bdf6 * hpread.c (hpread_read_struct_type): Use accessor macros rather
than directly mucking around with data structures.
1997-08-06 06:24:31 +00:00
Per Bothner f7f37388dc * gdbtypes.h: Re-interpret struct field. Suppport address of static.
Add a bunch of macros.
	* coffread.c, dwarf2read.c, dwarfread.c, mdebugread.c, stabsread.c:
	Update to use new macros.
	* coffread.c, hpread.c, stabsread.c:  Remove bugus TYPE_FIELD_VALUE.
	* value.h, values.c (value_static_field):  New function.
	* cp-valprint.c, valops.c:  Modify to use value_static_field.
1997-08-05 21:58:57 +00:00
Fred Fish 609fd03384 * buildsym.h (struct subfile): Add debugformat member.
(record_debugformat): Declare global function.
	* buildsym.c (start_subfile): Initialize debugformat member
	to NULL.
	(record_debugformat): New function to record the format.
	(end_symtab): Copy format into symtab debugformat member.
	(end_symtab): Free subfile debugformat member.
	* symmisc.c (free_symtab): Free debugformat when freeing
	symtab.
	* symfile.c (allocate_symtab): Initialize the new debugformat
	member for new symtabs.
	* symtab.h (struct symtab): Add debugformat member.
	* source.c (source_info): Print the debug format.

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

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

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

	* buildsym.c (make_blockvector): Make global rather than static,
	(record_pending_block): New function, code moved from finish_block.
	(finish_block): Use record_pending_block.
	(free_pending_blocks): New function.
	(really_free_pendings): Call free_pending_blocks.
	(pending_blocks): Make static instead of global.
	(free_pendings): Make static instead of global.
1996-10-08 19:00:38 +00:00
Fred Fish 3f550b5940 * configure.in: Add test for "long long" support.
* configure: Regenerate with autoconf.
	* acconfig.h: Add CC_HAS_LONG_LONG
	* config.in: Regenerate with autoheader.
	* config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
	* config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	(FORCE_LONG_LONG): Remove.
	* config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
	* config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/pa/tm-hppa.h (GET_FIELD): Put parens around
	subtraction inside shift.  Put parens around subtraction
	in operand of bitwise and.
	(struct frame_info): Forward declare
 	if __STDC__ defined.
	(frame_saved_regs): Ditto.
	(struct value): Ditto.
	(struct type): Ditto.
	(struct inferior_status): Ditto.
	(init_extra_frame_info): Add prototype.
	(skip_prologue): Ditto.
	(frameless_function_invocation): Ditto.
	(frame_chain): Ditto.
	(frame_chain_valid): Ditto.
	(saved_pc_after_call): Ditto.
	(hppa_fix_call_dummy): Ditto.
	(hppa_push_arguments): Ditto.
	(pa_do_registers_info): Ditto.
	(in_solib_call_trampoline): Ditto.
	(in_solib_return_trampoline): Ditto.
	(push_dummy_frame): Ditto.
	* convex-tdep.c (decout): Use print_longest rather than
	fprintf_filtered.
	* defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
	CC_HAS_LONG_LONG.
	(INT_MIN): Fix so it works correctly when assigned to a long long.
	* valprint.c (longest_to_int): Rewrite to remove dependence
	on INT_MIN and INT_MAX.
	(print_longest): Rewrite the code that falls back to synthesized
	hex output when LONGEST value is not representable as in a long and
 	printf doesn't support printing long longs.
	* ch-valprint.c (chill_val_print): Cast 2nd arg of
	chill_print_type_scalar to LONGEST.
	chill_print_type_scalar): Make static and add prototype.
	* hppa-tdep.c (get_field): Ifdef out unused function.
	(set_field): Ditto.
	(extract_3): Ditto.
	(extract_5_store): Ditto.
	(extract_11): Ditto.
	(extract_12): Ditto.
	(deposit_17): Ditto.
	(extract_14): Convert to static and add prototype.
	(deposit_14): Ditto.
	(extract_21): Ditto.
	(deposit_21): Ditto.
	(extract_17): Ditto.
	(extract_5r_store): Ditto.
	(extract_5R_store): Ditto.
	(extract_5_load): Ditto.
	(find_proc_framesize): Ditto.
	(find_dummy_frame_regs): Ditto.
	(sign_extend): Ditto.
	(find_unwind_entry): Add prototype.
	(find_return_regnum): Ditto.
	(unwind_command): Ditto.
	(find_dummy_frame_regs): Add parens around subtraction in operand
	of bitwise-and.
	(skip_prologue): Add parens around operands of logical-and inside
	operand of logical-or.
	(sign_extend): Add parens around operands of subtraction inside
	operand of shift.
	(low_sign_extend): Ditto.
	* top.c (filename_completer): Convert old style decl of
	filename_completion_function into prototype.
	* f-lang.c (patch_common_entries): Ifdef out unused function.
	* stabsread.c (read_cfront_baseclasses): Remove unused local
	variable "msg_noterm".
	(resolve_cfront_continuation): Remove unused local variable "fip".
	(read_type): Remove unused variable xtypenums.
	(read_cfront_static_fields): Remove unused variable "i".
	(read_cfront_static_fields): Remove unused variable "nfields".
	(read_cfront_member_functions): Add missing comment terminator.
	(read_cfront_static_fields): Return 1 rather than random value.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Remove unused
	variable "u".
	(som_solib_create_inferior_hook): Remove unused variable
	shadow_contents.
	(language.h): Add for needed prototypes.
	(som_solib_sharedlibrary_command): Add prototype.
	* hpread.c: (hpread_read_array_type): Add prototype.
	* somread.c (hpread_build_pysmtabs): Add prototype.
	(hpread_symfile_finish): Ditto.
	(hpread_symfile_init): Ditto.
	* hppah-nat.c (fetch_register): Convert old style decl
	to prototype.
	(gdbcore.h): Include for needed prototypes.
	(fetch_register): Remove unused variable "mess".
	* remote-pa.c (get_offsets): Ifdef out unused function.
	(remote_start_remote): Remove unused variable "timeout".
	(boot_board): Add prototype.
	(reaad_frame): Add prototype.
	(getpkt): Remove unused variable "bp".
	(remote_kill): Add prototype.
	(remote_mourn): Add prototype.
	(remote_insert_breakpoint): Add prototype.
	(remote_remove_breakpoint): Add prototype.
	* valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
	* infcmd.c (do_registers_info): Only need prototype if
	DO_REGISTERS_INFO is not defined.
	(breakpoint_auto_delete_contents): Only need if
	CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +00:00
Fred Fish d369b2139b * hpread.c (hpread_lookup_type): Use xmmalloc/xmrealloc rather
than xmalloc/xrealloc.
1996-07-13 05:34:40 +00:00
Fred Fish ace4b8d75a (laying some groundwork for a fix for PR 8443)
* coffread.c (record_minimal_symbol): Don't presave name string
	on symbol_obstack before passing to prim_record_minimal_symbol.
	It now handles saving the string itself.
	* dbxread.c (read_dbx_dynamic_symtab): Ditto.
	* mipsread.c (read_alphacoff_dynamic_symtab): Ditto.
	* os9kread.c (record_minimal_symbol): Ditto.
	* solib.c (solib_add_common_symbols): Ditto.

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

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

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

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

	* symfile.c (obsavestring): Update comments
	* solib.c (solib_add_common_symbols): Remove local var origname.
1996-07-08 09:05:18 +00:00
Fred Fish eae8aa302e * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and
	use it, rather than calling add_psymbol_addr_to_list.
	(add_psymbol_addr_to_list): Delete.
	(add_psymbol_to_list): Make psymbol static to avoid random data in
	gaps due to alignment of structure members.
	* symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST,
 	ADD_PSYMBOL_ADDR_TO_LIST): Remove.  Real world tests show no
	performance improvements by inlining via complicated macros and
	they just make gdb larger and harder to maintain.
	* dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST
	and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to
	add_psymbol_to_list with appropriate long or CORE_ADDR args.
	(add_partial_symbol): Ditto.
	* partial-stab.h: Ditto.
	* os9kread.c (read_os9k_psymtab): Ditto
	* mdebugread.c (parse_partial_symbols): Ditto.
	(handle_psymbol_enumerators): Ditto.
	(demangle.h): Include.
	* hpread.c (hpread_build_psymtabs): Ditto.
	(hpread_build_psymtabs): Ditto.
	(demangle.h): Include
1996-04-06 10:19:19 +00:00
Fred Fish 2ad5709f00 * bcache.c, bcache.h: New files to implement a byte cache.
* Makefile.in (SFILES): Add bcache.c.
	(symtab_h): Add bcache.h.
	(HFILES_NO_SRCDIR): add bcache.h
	(COMMON_OBJS): Add bcache.o
	(bcache.o): New target.
	* dbxread.c (start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
	* hpread.c (hpread_start_symtab):  Ditto.
	* os9kread.c (os9k_start_psymtab):  Ditto.
	* stabsread.h (start_psymtab):  Ditto.
	* {symfile.c, symfile.h} (start_psymtab_common):  Ditto.
	* maint.c (maintenance_print_statistics): Call
 	print_symbol_bcache_statistics.
	* objfiles.c (allocate_objfile): Initialize psymbol bcache malloc
	and free pointers.
	* solib.c (allocate_rt_common_objfile): Ditto.
	* symfile.c (reread_symbols):  Ditto.
	(free_objfile): Free psymbol bcache when objfile is freed.
	(objfile_relocate): Use new indirect psymbol pointers.
	* objfiles.h (struct objfile): Add psymbol cache.
	* symfile.c (compare_psymbols): Now passed pointers to pointers to
	psymbols.
	(reread_symbols): Free psymbol bcache when freeing other objfile
	resources.
	(add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new
	psymbol using the psymbol bcache.
	(init_psymbol_list): Psymbol lists now contain pointers rather than
	the actual psymbols.
	* symfile.h (psymbol_allocation_list): Psymbol lists now dynamically
	grown arrays of pointers.
	(ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol
	bcache.
	* symmisc.c (print_partial_symbols): Now takes pointer to pointer
	to partial symbol.
	(print_symbol_bcache_statistics): New function to print per objfile
 	bcache statistics.
	(print_partial_symbol, print_partial_symbols,
 	maintenance_check_symtabs, extend_psymbol_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2,
	make_symbol_completion_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.h (bcache.h): Include.
	* xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
1996-02-16 22:14:47 +00:00
Fred Fish c37c7c6ca3 * somsolib.c (som_solib_add): Use xmalloc rather than bare
unchecked call to malloc.
	* remote-mips.c (pmon_load_fast): ditto.
	* remote-mm.c (mm_open): ditto.
	* hpread.c (hpread_lookup_type): ditto.
	* remote-adapt.c (adapt_open): ditto.
1996-02-12 22:13:18 +00:00
Jeff Law 60d5a517fb * hpread.c (hpread_build_psymtabs): Finish Jan 4th
enum namespace -> enum_namespace change.
1996-01-09 16:35:32 +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