Commit Graph

179 Commits

Author SHA1 Message Date
Michael Chastain 72e5f48470 2003-08-21 Michael Chastain <mec@shout.net>
* gdbtypes.h: Change array bound type from an int to enum.
2003-08-22 05:05:56 +00:00
Michael Chastain 0955bbf0c0 2003-08-20 Michael Chastain <mec@shout.net>
* gdbtypes.h (struct main_type): Rearrange to save space.
2003-08-20 23:00:06 +00:00
Andrew Cagney 449a5da47c 2003-06-23 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_register_virtual_type): Add explict cases
	for 0 "int0" and 4 "int32" sized registers.
	* gdbtypes.c (builtin_type_int0): Define.
	(build_gdbtypes): Initialize builtin_type_int0.
	* gdbtypes.h (builtin_type_int0): Declare.
2003-06-23 21:05:40 +00:00
Elena Zannoni 176620f10b 2003-05-14 Elena Zannoni <ezannoni@redhat.com>
* symtab.h (enum domain_enum): Rename from namespace_enum.
	(UNDEF_DOMAIN, VAR_DOMAIN, STRUCT_DOMAIN, LABEL_DOMAIN,
	VARIABLES_DOMAIN, FUNCTIONS_DOMAIN, TYPES_DOMAIN, METHODS_DOMAIN):
	Rename from UNDEF_NAMESPACE, VAR_NAMESPACE, STRUCT_NAMESPACE,
	LABEL_NAMESPACE, VARIABLES_NAMESPACE, FUNCTIONS_NAMESPACE,
	TYPES_NAMESPACE, METHODS_NAMESPACE.
	(SYMBOL_NAMESPACE): Rename to SYMBOL_DOMAIN.
	(struct symbol, struct partial_symbol): Rename field
	'namespace_enum namespace' to 'domain_enum domain'.
	(PSYMBOL_NAMESPACE): Rename to PSYMBOL_DOMAIN.
	Delete old define kludge for namespace.

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

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

	* mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to
	VAR_DOMAIN.
2003-05-14 17:43:20 +00:00
Andrew Cagney da3331ec16 2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
	* gdbarch.h: Regnerate.
	* symtab.h: Add missing opaque declarations.
	* value.h, target.h, symfile.h, stabsread.h: Ditto.
	* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
	* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
	* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
	* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
	* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
	* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
	* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
	* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
	* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
	* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
	* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
	* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-12 17:41:26 +00:00
Andrew Cagney a2867626c1 2003-03-18 Andrew Cagney <cagney@redhat.com>
* printcmd.c (print_scalar_formatted): Change VALADDR parameter to
	a void pointer.
	* gdbtypes.h (print_scalar_formatted): Update declaration.
	* expression.h (enum exp_opcode): Remove non-ISO C trailing comma.
2003-03-18 22:03:29 +00:00
Kevin Buettner ab5d3da63e Move ``length'' from struct main_type to struct type. 2003-02-07 21:44:01 +00:00
David Carlton 1c5cb38e90 2003-02-04 David Carlton <carlton@math.stanford.edu>
* gdb.texinfo (C@t{++}): Recommend DWARF 2, then stabs+.
	(Variables): Recommend stabs+ and DWARF 2.
	(C plus plus expressions): Correct info about
	compiler versions, debug formats.
	(Contributors): Change 'DWARF2' to 'DWARF 2'.
	PR symtab/874.

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

	* gdb.c++/overload.exp: Test intToChar(1).
	* gdb.c++/overload.cc (intToChar): New.
	(main): Call intToChar.
2003-02-04 21:19:27 +00:00
Andrew Cagney 570b8f7c95 2003-01-18 Andrew Cagney <ac131313@redhat.com>
* cris-tdep.c: Fix function declaration indentation.
	* dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
	* mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
	* rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
	* symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
	* xcoffread.c, config/pa/tm-hppa.h: Ditto.
	* config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
2003-01-19 04:06:47 +00:00
Andrew Cagney 1bac305b72 2003-01-13 Andrew Cagney <ac131313@redhat.com>
* ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright.
	* demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright.
	* elfread.c, eval.c, expprint.c, expression.h: Update copyright.
	* f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright.
	* gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright.
	* language.c, language.h, m32r-tdep.c: Update copyright.
	* mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright.
	* somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright.
	* thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright.
	* values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright.
	* x86-64-linux-tdep.c, z8k-tdep.c: Update copyright.
	* cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright.

Index: mi/ChangeLog
2003-01-13  Andrew Cagney  <ac131313@redhat.com>

	* mi-cmd-env.c: Update copyright.
2003-01-14 00:49:06 +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 321432c0c6 * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
(ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
	``char *'' for return and parameter types.
	* gdbarch.h, gdbarch.c: Regenerate.
	* gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
	return type from ``char *'' to ``const char *''.
	* c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
	const.
2002-12-11 20:19:39 +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
Kevin Buettner 8b2dbe47f3 Address class support. 2002-10-16 20:50:22 +00:00
Daniel Jacobowitz de17c821b3 * gdbtypes.c (check_stub_method): Make static.
(check_stub_method_group): New function.
        * gdbtypes.h: Update prototypes.
        * cp-support.c: New file.
        * cp-support.h: New file.

        * stabsread.c: Include "cp-abi.h" and "cp-support.h".
        (update_method_name_from_physname): New function.
        (read_member_functions): Correct method names for operators
        and v3 constructors/destructors.  Separate v2 constructors and
        destructors.
        * Makefile.in (stabsread.o): Update dependencies.
        (SFILES): Add cp-support.c.
        (COMMON_OBS): Add cp-support.o.
        (cp_support_h, cp-support.o): Add.

        * cp-valprint.c (cp_print_class_method): Call
        check_stub_method_group instead of check_stub_method.  Remove
        extraneous QUITs.
        * p-valprint.c (pascal_object_print_class_method): Likewise.
        * valops.c (search_struct_method): Likewise.
        (find_method_list, value_struct_elt_for_reference): Likewise.
2002-09-14 02:09:39 +00:00
Andrew Cagney b063e7a269 2002-08-10 Andrew Cagney <cagney@redhat.com>
Elena Zannoni  <ezannoni@redhat.com>
            Martin M. Hunt  <hunt@redhat.com>

* gdbtypes.c (build_builtin_type_vec128): Set the vector bit.
(build_builtin_type_vec128i): Set the vector bit.
* gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare.
* gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define.
(build_builtin_type_vec64): New function.
(build_builtin_type_vec64i): New function.
(build_gdbtypes): Initialize builtin_type_vec64 and
builtin_type_vec64i.
2002-08-10 05:12:40 +00:00
Andrew Cagney db034ac512 2002-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Menion that CHILL has been made obsolete.

* gdbtypes.c (chill_varying_type): Make chill references obsolete.
* gdbserver/Makefile.in: Ditto.
* stabsread.c (read_range_type): Ditto.
* gdbtypes.h: Ditto.
* language.c (binop_type_check): Ditto.
(binop_result_type): Ditto.
(integral_type): Ditto.
(character_type): Ditto.
(string_type): Ditto.
(boolean_type): Ditto.
(structured_type): Ditto.
(lang_bool_type): Ditto.
(binop_type_check): Ditto.
* language.h (_LANG_chill): Ditto.
* dwarfread.c (set_cu_language): Ditto.
* dwarfread.c (CHILL_PRODUCER): Ditto.
* dwarfread.c (handle_producer): Ditto.
* expression.h (enum exp_opcode): Ditto.
* eval.c: Ditto for comments.
* typeprint.c (typedef_print) [_LANG_chill]: Ditto.
* expprint.c (print_subexp): Ditto.
(print_subexp): Ditto.
* valops.c (value_cast): Ditto.
(search_struct_field): Ditto.
* value.h (COERCE_VARYING_ARRAY): Ditto.
* symfile.c (init_filename_language_table): Ditto.
(add_psymbol_with_dem_name_to_list): Ditto.
* valarith.c (value_binop): Ditto.
(value_neg): Ditto.
* valops.c (value_slice): Ditto.
* symtab.h (union language_specific): Ditto.
(SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
(SYMBOL_DEMANGLED_NAME): Ditto.
(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
* defs.h (enum language): Ditto.
* symtab.c (got_symtab): Ditto.
* utils.c (fprintf_symbol_filtered): Ditto.

* ch-typeprint.c: Make file obsolete.
* ch-valprint.c: Make file obsolete.
* ch-lang.h: Make file obsolete.
* ch-exp.c: Make file obsolete.
* ch-lang.c: Make file obsolete.

* Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
CHILL_LIB.
(TARGET_FLAGS_TO_PASS): Ditto.
(CHILLFLAGS): Obsolete.
(CHILL): Obsolete.
(CHILL_FOR_TARGET): Obsolete.
(CHILL_LIB): Obsolete.
(SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
ch-valprint.c.
(HFILES_NO_SRCDIR): Remove ch-lang.h.
(COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
ch-lang.o.
(ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
targets.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
to CHILL.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
CHILL_FOR_TARGET and CHILL_LIB.
* configure.in (configdirs): Remove gdb.chill.
* configure: Regenerate.
* lib/gdb.exp: Obsolete references to chill.
* gdb.fortran/types.exp: Ditto.
* gdb.fortran/exprs.exp: Ditto.
2002-08-01 17:18:35 +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
Martin Hunt 3139facc61 2002-05-27 Martin M. Hunt <hunt@redhat.com>
* i386-tdep.c (i386_register_virtual_type): Return
	builtin_type_vec128i for SSE registers.

	* gdbtypes.h (builtin_type_vec128i): Declare.

	* gdbtypes.c (build_builtin_type_vec128i): New function.
	(builtin_type_v2_double, builtin_type_v4_int64): New types.
	(builtin_type_vec128i): New type for SSE2 128-bit registers.
	(build_gdbtypes): Initialize new builtin vector types.
	(_initialize_gdbtypes): Register new vector types with gdbarch.
2002-05-27 09:17:24 +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 4c90d51b96 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:21:12 +00:00
Elena Zannoni f5f8a0099e 2002-04-24 Elena Zannoni <ezannoni@redhat.com>
* gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define.
         * gdbtypes.c (recursive_dump_type): Output the vector flag.
         * dwarf2read.c (dwarf_attr_name): Handle new attribute for
         vectors.
         (read_array_type): Record the fact that this array type is really a
         vector (i.e. are passed in by value).
2002-04-26 20:08:19 +00:00
Andrew Cagney 0e10145828 * gdbtypes.c (append_composite_type_field): New function.
(init_composite_type): New function.
* gdbtypes.h (append_composite_type_field): Declare.
(init_composite_type): Ditto.
2002-03-23 01:24:54 +00:00
Daniel Jacobowitz dd6bda650a 2002-02-01 Daniel Jacobowitz <drow@mvista.com>
PR gdb/280
        * gdbtypes.c (replace_type): New function.
        * gdbtypes.h (replace_type): Add prototype.
        * stabsread.c (read_type): Use replace_type.
2002-02-03 22:57:56 +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 b02dede253 2002-01-20 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct cplus_struct_type): Add is_artificial to
	member function fields.  Add accessor macro
	TYPE_FN_FIELD_ARTIFICIAL.
	* dwarf2read.c (dwarf2_add_member_fn): Check for artificial methods.
	* c-typeprint.c (c_type_print_base): Skip artificial member
	functions.
2002-01-20 19:20:16 +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
Elena Zannoni 08cf96df0e 2002-01-15 Elena Zannoni <ezannoni@redhat.com>
[Based on work by Jim Blandy]

	* gdbtypes.h (builtin_type_v16qi, builtin_type_v8hi): Export.
	(builtin_type_vec128): Export.

	* gdbtypes.c (builtin_type_v16qi, builtin_type_v8hi): New SIMD
	types.
	(builtin_type_vec128): New builtin type for 128 bit vector
	registers.
	(build_gdbtypes): Initialize builtin_type_v16qi and
	builtin_type_v8hi. Create the vec128 register builtin type
	structure.
	(build_builtin_type_vec128): New function.
 	(_initialize_gdbtypes): Register builtin_type_v16qi and
	builtin_type_v8hi with gdbarch. Same for builtin_type_vec128.

	* rs6000-tdep.c (rs6000_register_virtual_type): Change type of
	AltiVec register to new builtin type.
2002-01-15 19:38:19 +00:00
Fred Fish aa468c6030 Approved by Jim Blandy:
2001-12-09  Fred Fish  <fnf@redhat.com>
	* gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_CONST,
	TYPE_VOLATILE, TYPE_INCOMPLETE): Move macros that test the
	bits to location in file where the bits are defined.
	(TYPE_STUB, TYPE_TARGET_STUB, TYPE_STATIC, TYPE_PROTOTYPED,
	TYPE_CODE_SPACE, TYPE_DATA_SPACE): New test macros.
2001-12-10 06:17:01 +00:00
Fred Fish 878ac5308a Approved by Jim Blandy:
2001-12-08  Fred Fish  <fnf@redhat.com>
	* dwarf2read.c (TYPE_FLAG_VARARGS): Remove from here.
	* gdbtypes.h (TYPE_FLAG_VARARGS): Add here and change value to
	not collide with other flag bits.
2001-12-09 07:29:46 +00:00
Daniel Jacobowitz a02fd225ed * gdbtypes.c (finish_cv_type): New function.
(check_typedef): Remove ``register'' keyword from argument.
        Preserve const and volatile attributes across filling in
        opaque types.
        * gdbtypes.h (finish_cv_type): Add prototype.

        * hp-symtab-read.c (hpread_read_struct_type): Call finish_cv_type.
        * stabsread.c (read_struct_type): Likewise.
        * dwarf2read.c (read_structure_scope): Likewise.  Remove redundant
        assignment to die->type.
2001-12-07 22:11:51 +00:00
Michael Snyder 47663de598 2001-11-14 Michael Snyder <msnyder@redhat.com>
Add address space identifiers to expression language for types.
	* c-exp.y (space_identifier, cv_with_space_id,
	const_or_volatile_or_space_identifier_noopt,
	const_or_volatile_or_space_identifier): New terminals.
	(ptype): Accept const_or_volatile_or_space_identifier.
	(typebase): Accept const_or_volatile_or_space_identifier.
	* c-typeprint.c (c_type_print_cv_qualifier): Rename to
	c_type_print_modifier.  Handle address space modified types.
	* gdbtypes.h (TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE):
	New type flags.
	(struct type): Add new field as_type for addr-space qualified types.
	(TYPE_AS_TYPE): New macro, retrieves the chain of types that are
	identical to this one except for address-space qualification.
	* gdbtypes.c (alloc_type): Initialize new field 'as_type'.
	(address_space_name_to_int): New function.
	(address_space_int_to_name): New function.
	(make_type_with_address_space): New function.
	(make_cv_type): Handle as_type field of new struct type object.
	* parse.c (check_type_stack_depth): New function.
	(push_type_address_space): New function.
	(follow_types): Handle types with address-space qualifier.
	* parser-defs.h (enum type_pieces): Add enum tp_space_identifier.
2001-11-15 01:55:59 +00:00
Elena Zannoni 8b982acfc6 2001-11-13 Elena Zannoni <ezannoni@redhat.com>
From Andrew Cagney <cagney@redhat.com>:
	* gdbtypes.h (builtin_type_int128, builtin_type_uint128): Declare.
	* gdbtypes.c (_initialize_gdbtypes, build_gdbtypes): Initialize
	new builtin types.
2001-11-13 19:07:00 +00:00
Mark Kettenis 7fc73f389d * gdbtypes.h (struct block): Add forward declaration. 2001-09-08 10:16:57 +00:00
Jim Blandy 6369010f56 * gdbtypes.h (struct type): Doc fix. 2001-09-05 23:07:32 +00:00
Andrew Cagney 598f52dfcc * gdbtypes.h (builtin_type_ieee_single_big)
(builtin_type_ieee_single_little, builtin_type_ieee_double_big)
(builtin_type_ieee_double_little)
(builtin_type_ieee_double_littlebyte_bigword)
(builtin_type_i387_ext, builtin_type_m68881_ext)
(builtin_type_i960_ext, builtin_type_m88110_ext)
(builtin_type_m88110_harris_ext, builtin_type_arm_ext_big)
(builtin_type_arm_ext_littlebyte_bigword)
(builtin_type_ia64_spill_big, builtin_type_ia64_spill_little)
(builtin_type_ia64_quad_big)
(builtin_type_ia64_quad_little): Declare.
* gdbtypes.c (builtin_type_ieee_single_big)
(builtin_type_ieee_single_little, builtin_type_ieee_double_big)
(builtin_type_ieee_double_little)
(builtin_type_ieee_double_littlebyte_bigword)
(builtin_type_i387_ext, builtin_type_m68881_ext)
(builtin_type_i960_ext, builtin_type_m88110_ext)
(builtin_type_m88110_harris_ext, builtin_type_arm_ext_big)
(builtin_type_arm_ext_littlebyte_bigword)
(builtin_type_ia64_spill_big, builtin_type_ia64_spill_little)
(builtin_type_ia64_quad_big)
(builtin_type_ia64_quad_little): Define.
(_initialize_gdbtypes): Initialize builtin floatformat types.
2001-08-24 04:46:43 +00:00
Andrew Cagney 701c159d91 Add TYPE_FLOATFORMAT(). 2001-08-23 01:09:38 +00:00
Andrew Cagney 1c72f9b0c4 * gdbtypes.h (struct type): Clarify meaning of field ``length''. 2001-08-21 00:24:58 +00:00
Andrew Cagney 090a2205b5 * gdbtypes.h (builtin_type_void_data_ptr): Rename
builtin_type_ptr.
* gdbtypes.c (builtin_type_void_data_ptr): Update.
(build_gdbtypes): Update.
(_initialize_gdbtypes): Update.
* values.c (value_as_pointer): Update.
* utils.c (host_pointer_to_address): Update.
(address_to_host_pointer): Update.
2001-07-08 20:42:15 +00:00
Jim Blandy ee3a7b7f0d * gdbtypes.h (builtin_type_void_func_ptr): New builtin type.
* gdbtypes.c (builtin_type_void_func_ptr): Define the variable.
(build_gdbtypes): Initialize it.
(_initialize_gdbtypes): Swap it.
2001-07-06 14:44:19 +00:00
J.T. Conklin 3172dc307b * arch-utils.c (#include "gdbthread.h"): Removed.
(#include "symfile.h"): Removed.
(XMALLOC): Removed unused macro.
* breakpoint.c (tbreak_command): Removed local declaration.
(awatch_command, do_enable_breakpoint, set_breakpoint_count):
Remove duplicate declarations.
(bpstat_should_step, bpstat_have_active_hw_watchpoints)
(remove_solib_event_breakpoints): Fix indentation botch.
* c-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* ch-exp.c (ch_terminal_match_float_literal, parse_expr)
(parse_primval, parse_untyped_expr, parse_opt_untyped_expr):
Removed duplicate declarations.
* ch-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* corefile.c (#include "frame.h"): Removed
(#include "symfile.h"): Removed.
(#include "language.h"): Removed.
* dbxread.c (#include "command.h"): Removed.
* environ.c (#include "gdbcore.h"): Removed.
* event-loop.c (#include "top.h"): Removed.
* f-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
(#include "typeprint.h"): Removed.
(#include "frame.h"): Removed.
* gdbtypes.h (print_type_scalar): Removed declaration.
* infcmd.c (#include "completer.h"): Removed.
* language.c (#include "frame.h"): Removed.
* m2-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
(#include "language.h"): Removed.
* m2-valprint.c (#include "valprint.h"): Removed.
* p-typeprint.c (#include "command.h"): Removed.
(#include "gdbcmd.h"): Removed.
* p-valprint.c (#include "typeprint.h"): Removed.
* parse.c (#include "linespec.h"): Removed.
* regcache.c (#include "frame.h"): Removed.
* remote.c (#include "frame.h"): Removed.
(getpkt_sane): Make static.
* source.c (#include "completer.h"): Removed.
* stack.c (#include "symfile.h"): Removed.
(#include "objfiles.h"): Removed.
* symfile.c (#include "completer.h"): Removed.
* tracepoint.c (#include "completer.h"): Removed.
* values.c (#include "frame.h"): Removed.
* varobj.c (#include "valprint.h"): Removed.
* wrapper.c (#include "frame.h"): Removed.

* memattr.c (create_mem_region): Removed unused variable.
* remote-nrom.c: Removed spurious semicolon after init_nrom_ops.
-------------------------------------------------------------------
2001-03-27 20:36:24 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
J.T. Conklin ba41d5499a * gdbtypes.h (builtin_type_f_integer): Removed duplicate declaration.
(MAX_OF_TYPE): Wrap macro definition in parenthesis.
(MIN_OF_TYPE): Likewise.

* memattr.h (mem_access_mode): Removed extraneous trailing comma.
2001-03-01 21:56:35 +00:00
David Anderson ba91526b3d Corrected typo in comment: ofa -> of a 2000-09-02 00:05:43 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney db577aea67 From Daniel Berlin:
Fix C++ overloading, add support for seeing through references.
2000-03-13 10:01:23 +00:00
Andrew Cagney 7b83ea04b2 Revert: ``Fix C++ overload support, see through references''.
Change also contained numerous white-space changes.
2000-03-13 07:30:00 +00:00
Daniel Berlin 09b59ee380 Fix C++ overload support, see through references 2000-03-10 08:02:58 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda adf40b2e16 import gdb-1999-07-19 snapshot 1999-07-19 23:30:11 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 9e0b60a847 import gdb-1999-06-21 snapshot 1999-06-21 13:27:42 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 4ef1f46773 hp merge changes -- too numerous to mention here; see ChangeLog and
ChangeLog-gdbtk for details.
1998-12-28 23:06:13 +00:00
Andrew Cagney 980714f9c8 Add builtin explicitly sized 8, 16, 32, 64 and 128 bit int and
unsigned types.
Specify size of r5900 FSR using 32 bit unsigned type.
Correctly format mips registers when some are not 64 bits in size
Check that REGISTER_{RAW,VIRTUAL}_SIZE are consistent when the target
specifies that no conversion is needed when moving from one to the
other.
1998-03-20 07:50:33 +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
Peter Schauer a46d92a736 * c-exp.y (qualified_name): Replace explicit check for valid
destructor name with call to destructor_name_p.

	* c-lang.h, c-typeprint.c (cp_type_print_method_args):  Removed,
	no longer needed.

	* c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base):
	Replace remaining fprintf_unfiltered calls with their filtered variant.
	(c_type_print_base):  Do not print return type for destructors from
	template classes.
	Replace cp_type_print_method_args with cplus_demangle call to get
	consistent type output for stubbed and unstubbed methods.

	* cp-valprint.c (cp_print_class_method):  Replace
	cp_type_print_method_args with cplus_demangle call to get consistent
	type output for stubbed and unstubbed methods.

	* gdbtypes.c, gdbtypes.h (get_destructor_fn_field):  New function
	to find the destructor field indices for a type.

	* gdbtypes.h (struct type):  Clarify comments for vptr_basetype
	and arg_types fields.
	(struct fn_field):  Remove args field, no longer used.

	* symtab.c (decode_line_1), valops.c (value_struct_elt,
	check_field_in):  Use get_destructor_fn_field to find the destructor
	field indices instead of assuming that the compiler passes the member
	function fields in a specific order.

	* symtab.c (find_methods):  Pass NULL instead of SYMBOL_BLOCK_VALUE
	to lookup_symbol.
	(list_symbol):  Replace cp_type_print_method_args with cplus_demangle
	call in zapped out code and explain why this code is zapped out.
1996-12-14 09:17:22 +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 b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Per Bothner d1f4065e64 * gdbtypes.h (enum type_code): Added TYPE_CODE_TYPEDEF.
(check_typedef):  New prototype.
	(CHECK_TYPEDEF):  New macro.
	(TYPE_DUMMY_RANGE):  Removed.
	* gdbtypes.c (get_discrete_bounds):  Fix paren error; make more robust.
	(create_array_type):  Don't force_to_range_type;  users of the
	array are responsible for handling non-range index types.
	(create_set_type):  Likewise.
	(force_to_range_type):  Removed.
	(check_typedef):  New function handles stub types and typedefs.
	(check_stub_type):  Just call check_typedef. (To be removed.)
	(recursive_dump_type):  Handle TYPE_CODE_TYPEDEF.
	* ch-lang.c (type_lower_upper):  Use get_discrete_bounds.
	(evaluate_subexp_chill):  Handle string repetition.
	Re-arrange to handle EVAL_AVOID_SIDE_EFFECTS better.
	* ch-typeprint.c (chill_type_print_base):  Handle TYPE_CODE_TYPEDEF.
	Pass show=0 in recursive calls various places.
	(case TYPE_CODE_ARRAY):  Don't require index type to have
	TYPE_CODE_RANGE.
	(case TYPE_CODE_RANGE):  Don't need to support TYPE_DUMMY_RANGE.
	* gdbtypes.c, ch-lang.c, ch-typeprint.c (numerous places):
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 01:07:28 +00:00
Per Bothner 706bfe5a1c * gdbtypes.c (get_discrete_bounds): New function.
(force_to_range_type):  Use get_discrete_bounds.
	* gdbtypes.h (get_discrete_bounds):  Add declaration.
	* valarith.c (value_bit_index):  Generalize to use get_discrete_bounds.
	* ch-valprint.c (chill_val_print):  Make (power)sets and bitstring
	support use get_discrete_bounds and generally be more robust.
This fixes PR chill/8136.
1995-10-05 01:09:53 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner e55a579687 * gdbtypes.c (create_range_type): If indextype has TYPE_FLAG_STUB
set, set TYPE_FLAG_TARGET_STUB.
	(check_stub_type):  Recalculate TYPE_LENGTH for range type.
	* stabsread.c (read_range_type):  If index type number is followed
	by '=', back up, call read_type. and assume we have a true range.
	* gdbtypes.h (TYPE_FLAG_TARGET_STUB):  Update comment.
This fixes PR 6632.
1995-03-29 01:11:45 +00:00
Jim Kingdon a3012272b0 * gdbtypes.h (struct type): Fix comment about what units the
TYPE_LENGTH is in.
1995-03-14 14:05:16 +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
Stan Shebs 76a457c016 * Makefile.in (CLIBS): Add $(LIBIBERTY) before, in addition to
after, any host/target/native libraries.
	* dcache.c (insque, remque): Remove declarations.
	* gdbtypes.h (type_code): Remove trailing comma.

	From Peter Schauer:
	* xcoffread.c (read_xcoff_symtab) [C_HIDEXT]: Move #ifdef
	STATIC_NODEBUG_VARS inside case.
1995-02-10 00:02:15 +00:00
Per Bothner ead95f8ac2 * eval.c (evaluate_subexp): Clean up handling of
OP_UNDETERMINED_ARGLIST (no backtracking, more general).

	* f-valprint.c (f_val_print):  Print TYPE_CODE_STRING using
	LA_PRINT_STRING, and not val_print_string (which reads from inferior).

	* ch-lang.c (chill_is_varying_struct), ch-lang.h:  Remve function
	duplicate function made redundant by chill_varying_type.

	Re-write of f77 string and complex number support:

	* language.h (struct language_defn):  New fields string_lower_bound
	and string_char_type.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
	language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
	(f_language_defn), ch-lang.c (chill_language_defn):  Set new fields.
	* gdbtypes.c (create_string_type):  Use new string_char_type field.
	* valops.c (value_string):  Use new string_lower_bound field.

	* defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT):  Removed.
	* f-lang.c (f_create_fundamental_type, _initialize_f_language),
	m2-lang.c (m2_create_fundamental_type),
	gdbtypes.c (_initialize_gdbtypes):  Set TYPE_TARGET_TYPE of complex
	types.  Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
	* mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
	Removed.  Use builtin_type_complex and builtin_type_double_complex.

	* gdbtypes.h (enum type_code):  Removed TYPE_CODE_LITERAL_STRING
	and TYPE_CODE_LITERAL_COMPLEX.
	* c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c:  Removed uses of
	TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
	* gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
	f77_create_literal_string_type):  Removed.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
	VALUE_SUBSTRING_MYADDR):  Removed.

	* expression.h (enum exp_opcode):  Rename OP_F77_LITERAL_COMPLEX to
	OP_COMPLEX.
	* parse.c:  Update accordingly.

	* f-valprint.c (f77_print_cmplx):  Removed.
	(f_val_print case TYPE_CODE_COMPLEX):  Re-write to use print_floating.

	* f-exp.y (STRING_LITERAL):  Use OP_STRING instead of OP_ARRAY.
	* eval.c (evaluate_subexp):  For case OP_ARRAY, don't call
	f77_value_literal_string.
	* valops.c, value.h (f77_value_literal_string, f77_value_substring,
	f77_assign_from_literal_string, f77_assign_from_literal_complex):
	Removed.
	(value_assign):  No longer need to handle literal types.
	* valops.c (f77_value_literal_complex), value.h:  Re-written and
	renamed to value_literal_complex.  Last arg is now a (complex) type.
	* valops.c (f77_cast_into_complex):  Re-written and renamed to
	cast_into_complex.
	* eval.c (evaluate_subexp):  Update accordingly.
1995-02-02 03:37:26 +00:00
Per Bothner f91a9e05e0 * ch-exp.y (value_string_element, string_primitive_value,
start_element, left_element, right_element, slice_size,
	lower_element, upper_element, first_element):  Removed.
	(value_string_slice, value_array_slice):  Replaced by ...
	(slice):  New non-terminal, with working slice support.
	(primitive_value_lparen, rparen):  New non-terminals.
	(maybe_tuple_elements):  New non-terminal, to allow empty tuples.
	(idtokentab):  Added "up".

	* value.h (COERCE_VARYING_ARRAY):  New macro.
	* valarith.c (value_subscript):  Use it.
	* valops.c (value_cast):  Likewise.  Also, do nothing if already
	correct type, and allow converting from/to range to/from scalar.

	* valops.c, value.h (varying_to_slice, value_slice):  New functions.
	* eval.c (OP_ARRAY):  Add cast for array element.
	* expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT):  New exp_opcodes.
	* valops.c (chill_varying_type):  Moved function frp, here ...
	* gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
	* parse.c (length_of_subexp, prefixify_subexp):  Add support
	for TERNOP_SLICE, TERNOP_SLICE_COUNT.
	* expprint.c (print_subexp, dump_expression):  Likewise.
	* eval.c (evaluate_subexp):  Likewise.

	* eval.c (evaluate_subexp case MULTI_SUBSCRIPT):  Don't call
	value_x_binop on a Chill varying string.
1995-02-01 21:02:51 +00:00
Peter Schauer 9ed8604f38 * top.c (line_completion_function): Renamed from
symbol_completion_function, takes the line buffer and the
	point in the line buffer as additional arguments.
	(readline_line_completion_function):  New function, interface
	between readline and line_completion_function.
	(init_main):  Use it.
	(complete_command):  Use line_completion_function instead of
	abusing rl_line_buffer. Free completion strings after printing
	them.
	* symtab.c (completion_list_add_name):  Recheck for duplicates
	if we intend to add a modified symbol.

	* gdbtypes.h (cplus_struct_type):  nfn_fields_total no longer
	includes the number of methods from the baseclasses.
	* stabsread.c (attach_fn_fields_to_type):  No longer add the
	number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
	the baseclass type might not have been completely filled in yet.
	* symtab.c (total_number_of_methods):  New function to compute
	the total number of methods for a type, including the methods
	from baseclasses.
	(decode_line_1):  Use it instead of TYPE_NFN_FIELDS_TOTAL to
	allocate the symbol array for find_methods.

	* stabsread.c (scan_file_globals):  Add default case to minimal
	symbol type switch, to avoid gcc -Wall warnings.

	* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
	Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:51:32 +00:00
Per Bothner 6f52d064e4 * gdbtypes.h (TYPE_INDEX_TYPE): New macro.
* ch-typeprint.c, ch-valprint.c:  Use TYPE_INDEX_TYPE.
	* ch-valprint.c (chill_val_print):  Pass index type directly
	(instead of its TYPE_TARGET_TYPE) to print_type_scalar.
	* stabsread.c (read_type):  Don't set TYPE_FLAG_TARGET_STUB
	if the index type is a stub.
1994-09-17 00:38:23 +00:00
Jim Kingdon e44075d3aa * gdbtypes.h: Declare f77_create_literal_string_type and
f77_create_literal_complex_type.
	* valops.c (f77_value_literal_string, f77_value_substring,
	f77_value_literal_complex): Use xmalloc not malloc.
	* valops.c (f77_value_literal_string, f77_value_substring):
	Make addr char * not CORE_ADDR.
	* value.h (struct value): Add new field literal_data of aligner union.
	(VALUE_LITERAL_DATA): Use it.
	* f-lang.h: Declare find_common_for_function.
	* value.h, valops.c: Split VALUE_SUBSTRING_START into memaddr and
	myaddr fields of a union.  Don't overload it with the frame field
	(not sure this is necessary; I'm not sure what lval_* codes
	VALUE_SUBSTRING_* can be used with).
1994-08-23 21:39:50 +00:00
Stan Shebs a91a61923d Initial Fortran language support, adapted from work by Farooq Butt
(fmbutt@engage.sps.mot.com).
	* Makefile.in: Add Fortran-related files and dependencies.
	* defs.h (language_fortran): New language enum.
	* language.h (_LANG_fortran): Define.
	(MAX_FORTRAN_DIMS): Define.
	* expression.h: Reformat to standard.
	(MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST,
	OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes.
	* gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX,
	TYPE_CODE_LITERAL_STRING): New type codes.
	(type): New fields upper_bound_type and lower_bound_type.
	(TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE,
	TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New
	macros.
	(builtin_type_f_character, etc): Declare.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define.
	* f-exp.y: New file, Fortran expression grammar.
	* f-lang.c: New file, Fortran language support functions.
	* f-lang.h: New file, Fortran language support declarations.
	* f-typeprint.c: New file, Fortran type printing.
	* f-valprint.c: New file, Fortran value printing.
	* eval.c (evaluate_subexp): Add code for new expression opcodes,
	fix wording of error message.
	* gdbtypes.c (f77_create_literal_complex_type,
	f77_create_literal_string_type): New functions.
	* language.c (set_language_command): Add Fortran info.
	(calc_f77_array_dims): New function.
	* parse.c (length_of_subexp, prefixify_subexp): Add cases for new
	expression opcodes.
	* symfile.c (deduce_language_from_filename): Recognize .f and .F
	as Fortran source files.
	* valops.c (f77_value_literal_string, f77_value_substring,
	f77_value_literal_complex): New functions.
1994-08-19 21:59:05 +00:00
Jim Kingdon 9c036bd836 * utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Call
fputs_unfiltered and exit directly, rather than fatal.  The latter
	calls vfprintf_unfiltered!

	* gdbtypes.h, gdbtypes.c (can_dereference): New function.
	* value.h, printcmd.c (print_value_flags): Move from here...
	* annotate.c: ...to here, and make it use can_dereference.
1994-05-17 20:13:50 +00:00
Jim Kingdon 2f3b7d8eb5 * valops.c (value_at, value_at_lazy): Give error if we dereference
a pointer to void.
	* gdbtypes.h: Fix comments regarding TYPE_CODE_VOID.
	* stabsread.c: Use 1, not 0, for TYPE_LENGTH of void types.
1994-03-24 18:32:31 +00:00
Jim Kingdon e552788b73 * gdbtypes.h, gdbtypes.c: Add comments regarding whether static
member functions have an element in args for a (nonexistent) this
	pointer.
1994-03-23 15:52:11 +00:00
Jim Kingdon eade0c6ce8 * printcmd.c (decode_format): Don't blithely set the size for
an address to 'w'.  Make it 'g' or 'h', depending on TARGET_PTR_BIT.

	* defs.h: Just typedef CORE_ADDR to bfd_vma.  Include bfd.h.
	If BFD64, make a LONGEST a BFD_HOST_64_BIT.
	* defs.h (longest_to_int): Don't depend on CC_HAS_LONG_LONG; instead
	always just check against INT_MIN and INT_MAX (this also fixes things
	if sizeof (long) > sizeof (int), e.g. Alpha).
	* config/pa/tm-hppa.h, config/i386/sun386.h, config/rs6000/tm-rs6000.h:
	Don't define LONGEST or BUILTIN_TYPE_LONGEST.
	* gdbtypes.h: Remove BUILTIN_TYPE_LONGEST and
	BUILTIN_TYPE_UNSIGNED_LONGEST.
	* language.h, c-lang.c, ch-lang.c, m2-lang.c: Remove longest_int
	and longest_unsigned_int.
	* value.h (struct value): Just align to LONGEST, rather than worrying
	about CC_HAS_LONG_LONG.
	* valarith.c (value_binop, _initialize_valarith): Figure out type
	ourself based on sizeof (LONGEST) rather than relying on
	BUILTIN_TYPE_LONGEST.  The point is that we don't depend on
	CC_HAS_LONG_LONG anymore.
	* valprint.c (val_print_type_code_int): Just call
	extract_unsigned_integer directly, rather than going through
	unpack_long.
	* printcmd.c (decode_format): Remove code which would sometimes
	change 'g' size to 'w' for integers.  print_scalar_formatted handles
	printing huge integers well enough, thank you.
1994-02-03 03:18:58 +00:00
Jim Kingdon 61932a8ee9 * gdbtypes.h, ch-typeprint.c, ch-valprint.c:
Change comments regarding TYPE_CODE_BOOL.
	* language.c (boolean_type): Always return 1 for TYPE_CODE_BOOL,
	regardless of the language.
	(value_true): Just call value_logical_not regardless of language.
	* coffread.c (coff_read_enum_type), stabsread.c (read_enum_type):
	Remove #if 0'd code which makes some enums TYPE_CODE_BOOL.
	* language.h: Improve comment for la_builtin_type_vector.
	* m2-lang.c (_initialize_m2_language): Don't add any fields to
	builtin_type_m2_bool.
1994-02-02 17:20:45 +00:00
Jim Kingdon 666e7e4121 * gdbtypes.h: Expand on comments for TYPE_CODE_BITSTRING and
TYPE_CODE_STRING a bit.
1993-12-27 18:56:23 +00:00
Per Bothner cba009211a * ch-exp.y (match_dollar_tokens): Fix off-by-one bug.
* ch-lang.c (chill_is_varying_struct), ch-lang.h:  New function.
	* ch-lang.c (chill_printstr):  Use double quotes, not single quotes.
	* ch-typeprint.c (chill_type_print_base):  Handle TYPE_CODE_BITSTRING.
	Improve printing of TYPE_CODE_STRING, TYPE_CODE_SET, and
	TYPE_CODE_STRUCT (including checking chill_is_varying_struct).
	Print TYPE_DUMMY_RANGE by printing its TYPE_TARGET_TYPE.
	Handle TYPE_CODE_ENUM.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_BITSTRING.
	For TYPE_CODE_STRING, never print address.  Handle VARYING strings.
	* gdbtypes.c (force_to_range_type):  New.
	* gdbtypes.c (create_set_type):  Make work, following Chill layout.
	* gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND, TYPE_DUMMY_RANGE): New.
	* stabsread.c (read_type):  Distinguish string and bitstring from
	char-array and set.
	* valarith.c (value_subscript), valops.c (value_coerce_array):
	Handle STRINGs as well as ARRAYs.
	* valarith.c (value_bit_index):  Fix think.  Use new macros.
1993-12-21 22:18:51 +00:00
Per Bothner e909f287a8 Implement support for Chill POWERSETs.
* ch-exp.y (operand_2):  Implement 'Element IN PowerSet'.
	* ch-typeprint.c (chill_type_print_base):  Handle POWERSETs.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_SET.
	* eval.c (evaluate_subexp):  Implement BINOP_IN.
	* expression.h (enum exp_opcode):  Added BINOP_IN.
	* gdbtypes.c (create_set_type), gdbtypes.h:  New function.
	* stabsread.c (read_type):  If 'S', create a set type.
	* valarith.c (value_bit_index, value_in), value.h:  New functions,
	for indexing in SETs.
1993-12-14 04:32:51 +00:00
Jim Kingdon dda398c369 * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
* gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
	what cleanup_undefined_types does for arrays, except we clear
	TYPE_FLAG_TARGET_STUB if we fix up the type.
	* stabsread.c (cleanup_undefined_types): Add comments about how
	doing arrays here is no longer the clean way to do it.
	(read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
	add_undefined_type.
	* c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
	outside switch so it happens for all type codes.
	* cp-valprint.c (cp_print_value_fields): Recurse to val_print,
	instead of c_val_print, so that check_stub_type gets called.

	* gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
	TYPE_FLAG_SIGNED.  It was inconsistently set, never checked
	(except in recursive_dump_type), and is pointless.
1993-11-15 20:13:30 +00:00
Kung Hsu 024f65b180 Modified Files:
gdbtypes.h stabsread.c cp-valprint.c ChangeLog

        * gdbtypes.h : add a field 'ignore_field_bits in cplus_specific,
        and macros to handle the bits.
        * stabsread.c (read_one_struct_field): add VISIBILITY_IGNORE, and
        for field of length 0, set this bit on.
        * cp-valprint.c (cp_print_value_fields): for VISIBILITY_IGNORE
        field, print <no value>.
1993-11-06 01:32:11 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +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 065525e3a7 add comments re stub types 1993-08-26 15:37:03 +00:00
Jim Kingdon ac88287fa2 * gdbtypes.c (fill_in_vptr_fieldno): Call check_stub_type.
* gdbtypes.{c,h}: Improve comments on vptr_fieldno.
1993-08-02 19:21:04 +00:00
Jim Kingdon eec03ebb50 * gdbtypes.h: Improve comments about C++ methods. 1993-07-30 23:06:37 +00:00
Jim Kingdon b4c2267b03 gdbtypes.h: Fix comments regarding the following change:
Thu Jul  1 09:51:27 1993  Jim Kingdon  (kingdon@cygnus.com)

	* gdbtypes.h (struct type): Add field tag_name.
1993-07-07 18:26:03 +00:00
Jim Kingdon b2bebdb0f1 * gdbtypes.h (struct type): Add field tag_name.
* gdbtypes.c (type_name_no_tag), c-typeprint.c (c_type_print_base):
	Use it.
	* {coff,dwarf,mips,stabs}read.c: Set it.
1993-07-02 02:57:06 +00:00
Jim Kingdon ea753d03d6 * stabsread.c: Remove all uses of error(). Make error_type and
read_type_number static.
	(define_symbol): Don't try to deal with a missing symbol
	descriptor which isn't followed by digit, '(', or '-'.
	* stabsread.h: Don't declare read_type_number here.
	* gdbtypes.h: Don't declare error_type here.
	* xcoffread.c: Remove NO_TYPEDEFS code.
1993-05-25 19:39:41 +00:00
Jim Kingdon f52bde21f9 * stabsread.c: Remove most uses of lookup_fundamental_type.
(define_symbol): Use read_type for type of enum constant,
	not just read_type_number.  Also don't call error().
	(define_symbol): For unrecognized constant type, one complaint (the
	one from error_type) is	enough.  Don't make our own in addition.
	(define_symbol): Don't treat an N_FUN 'R' as a prototype.
	* gdbtypes.h: Doc fixes.
1993-05-22 19:20:37 +00:00
Fred Fish 7efb57c33d * defs.h (CC_HAS_LONG_LONG): Set up to define CC_HAS_LONG_LONG
when compiling with gcc, but disable it for now.  See comment.
	* defs.h (LONGEST):  Define as either "long" or "long long"
	based on CC_HAS_LONG_LONG.
	* defs.h (longest_to_int):  Use CC_HAS_LONG_LONG to control
	how longest_to_int is defined.
	* c-valprint.c (c_val_print):  Call print_longest.
	* expprint.c (dump_expression):  Use PRINTF_HAS_LONG_LONG
	instead of LONG_LONG.
	* {printcmd.c, gdbtypes.h} (LONG_LONG):  Replace usages with
	CC_HAS_LONG_LONG.
	* printcmd.c (print_scalar_formatted):  Call print_longest
	and let it figure out what to do for PRINTF_HAS_LONG_LONG.
	* typeprint.c (print_type_scalar):  Call print_longest and let
	it figure out what to do for PRINTF_HAS_LONG_LONG.
	* valprint.c (val_print_type_code_int):  Call print_longest
	and let it figure out what to do for PRINTF_HAS_LONG_LONG.
	* stabsread.c (LONG_LONG):  Replace usages with CC_HAS_LONG_LONG.
	* value.h (struct value):  Replace usage of LONG_LONG with
	CC_HAS_LONG_LONG.
	* value.h (print_longest):  Add prototype.
	* values.c (LONG_LONG):  Replace usages with CC_HAS_LONG_LONG.
	* values.c (unpack_double):  Collapse code that was unnecessarily
	dependent on CC_HAS_LONG_LONG.  Use LONGEST instead of direct types.
	* values.c (value_from_longest):  Remove dependency on
	CC_HAS_LONG_LONG and just use LONGEST.
	* solib.c (solib_map_sections):  Use bfd_get_filename
	to access filename field.
	* solib.c (clear_solib):  Save filename and free it later, after
	bfd_close, since bfd_close may reference it.  Use bfd_get_filename
	to access the field.
	* config/convex/xm-convex.h (LONG_LONG):  Replace with
	CC_HAS_LONG_LONG.  Add define for PRINTF_HAS_LONG_LONG.
	* doc/gdbint.texinfo (LONG_LONG):  Replace with CC_HAS_LONG_LONG.
	Add PRINTF_HAS_LONG_LONG references.
1993-04-29 07:07:39 +00:00
Fred Fish 5aefc1ca23 Remove chill sanitizations, which are no longer necessary. 1993-04-16 23:22:41 +00:00
Fred Fish fcbadaee94 * eval.c (evaluate_subexp): Fix OP_ARRAY, remove code that
implied that "no side effects" was nonfunctional.
	* eval.c (evaluate_subexp):  Add BINOP_CONCAT case to deal with
	character string and bitstring concatenation.
	* expprint.c (dump_expression):  Add case for BINOP_CONCAT.
	* expression.h (exp_opcode):  Add BINOP_CONCAT.
	* gdbtypes.h (type_code):  Add TYPE_CODE_BITSTRING.
	* language.c (string_type):  Add function to determine if a type
	is a string type.
	* language.c (binop_type_check):  Add case for BINOP_CONCAT.
	* valarith.c (value_concat):  New function to concatenate two
	values, such as character strings or bitstrings.
	* valops.c (value_string):  Remove error stub and implement
	function body.
	* value.h (value_concat):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (operand_3):  Add actions for SLASH_SLASH (//).
	* ch-exp.y (yylex):  Recognize SLASH_SLASH.
	* ch-lang.c (chill_op_print_tab):  Add SLASH_SLASH (//) as
	BINOP_CONCAT.
	**** end-sanitize-chill ****
1993-01-21 18:13:55 +00:00