Commit Graph

161 Commits

Author SHA1 Message Date
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
Andrew Cagney 5f11f35558 2002-10-25 Andrew Cagney <cagney@redhat.com>
* gdbtypes.c (address_space_name_to_int): Update.
	(address_space_int_to_name): Update.
	* gdbarch.sh (address_class_type_flags_to_name): Change to a pure
	multi-arch predicate.
	(address_class_name_to_type_flags): Ditto.
	* gdbarch.h, gdbarch.c: Re-generate.
2002-10-25 15:59:56 +00:00
Kevin Buettner 8b2dbe47f3 Address class support. 2002-10-16 20:50:22 +00:00
Daniel Jacobowitz cef4f5dd72 Fix PR gdb/778
* gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef
        before recursing.
        * gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value
        of fill_in_vptr_fieldno.
2002-10-02 22:01:53 +00:00
Mark Kettenis f710f4fc2c * gdbtypes.c (check_stub_method_group): Initialize found_stub to
zero.
2002-09-14 15:39:52 +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
Elena Zannoni 216b504fa7 2002-08-20 Elena Zannoni <ezannoni@redhat.com>
* gdbtypes.c (build_builtin_type_vec64): Add name to type.
	(build_builtin_type_vec64i): Ditto.
	(build_builtin_type_vec128): Ditto.
	(build_builtin_type_vec128i): Ditto.
2002-08-20 19:57:32 +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 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
Daniel Jacobowitz 4a1970e4a4 2005-05-11 Daniel Jacobowitz <drow@mvista.com>
Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>

        * Makefile.in: Update dependencies for valops.c.
        * valops.c: Include "gdb_assert.h".
        (typecmp): Skip THIS parameter to methods.
        (find_method_list): Remove static_memfuncp argument,
        update callers.  Check for stub methods.
        (find_value_oload_method_list): Don't set *static_memfuncp.
        (find_overload_match): Don't check for stub methods.  Assert
        that methods are not stubbed.  Handle static methods.
        (value_find_oload_method_list): Remove static_memfuncp argument.
        * gdbtypes.c (check_stub_method): Do not add THIS pointer
        to the argument list for static stub methods.
        * value.h (value_find_oload_method_list): Update prototype.
2002-05-12 02:20:38 +00:00
Elena Zannoni 6599f021bb 2002-05-08 Elena Zannoni <ezannoni@redhat.com>
* gdbtypes.c : Add new builtin type for 64 bit vectors.
        (build_gdbtypes): Build builtin_type_v2_float.
	(_initialize_gdbtypes): Register new builtin type.
2002-05-08 22:58:39 +00:00
Elena Zannoni ac3aafc7a6 2002-05-06 Elena Zannoni <ezannoni@redhat.com>
* gdbtypes.c (init_vector_type): New function.
	(build_builtin_type_vec128): Simplify the representation of SIMD
	registers.
	(build_gdbtypes): Initialize new builtin vector types.
	(_initialize_gdbtypes): Register new vector types with gdbarch.
	(builtin_type_v4_float, builtin_type_v4_int32,
	builtin_type_v8_int16, builtin_type_v16_int8,
	builtin_type_v2_int32, builtin_type_v4_int16,
	builtin_type_v8_int8): New (renamed) SIMD types.
2002-05-06 17:37:14 +00:00
Jim Blandy cda6c68a01 * gdbtypes.c (replace_type): Doc fix. 2002-05-04 21:24:07 +00:00
Jim Blandy 13a393b0d3 * stabsread.c (cleanup_undefined_types): Use replace_type, not memcpy.
(read_type): Doc fix.
* gdbtypes.c (replace_type): Doc fix.
2002-05-04 00:21:09 +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
Elena Zannoni 73d322b1b9 2002-04-19 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/471.
	* gdbtypes.c (init_simd_type): Rewrite using new functions.
	(build_builtin_type_vec128): Ditto..
	(append_composite_type_field): Fix calculation of type length in
	union case.
2002-04-20 01:09:28 +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
Corinna Vinschen 9c9532c936 * gdbtypes.c (build_gdbtypes): Disable setting a specific float format
on builtin float types.
2002-02-08 17:34:33 +00:00
Daniel Jacobowitz 493d28d51b 2002-02-03 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.c (init_simd_type): Use TYPE_TAG_NAME instead of
        accessing tag_name directly.
2002-02-03 23:18:11 +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
Andrew Cagney 069e84fd96 Initialize the TYPE_FLOATFORMAT field of the h/w floating-point
builtin types.
2002-01-22 19:57:40 +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
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
Jim Blandy 4e40929968 * gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
set the TYPE_FLAG_UNSIGNED bit on the type.
* s390-tdep.c (s390_gdbarch_init): On the S/390, characters
are unsigned by default.
* rs6000-tdep.c (rs6000_gdbarch_init): Same for PowerPC and
RS6000.
2001-12-20 03:26:08 +00:00
Fred Fish 74a9bb82c5 Approved by Jim Blandy:
2001-12-11  Fred Fish  <fnf@redhat.com>
	* c-typeprint.c (c_type_print_base): Use type flags access macros
	to test bits.
	* ch-typeprint.c (chill_type_print_base): Ditto.
	* ch-valprint.c (chill_val_print): Ditto.
	* d10v-tdep.c (d10v_pointer_to_address): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn): Ditto.
	* dwarfread.c (read_structure_scope): Ditto.
	* gdbtypes.c (create_range_type): Dittol
	(create_set_type): Ditto.
	(check_typedef): Ditto.
	* jv-typeprint.c (java_type_print_base): Ditto.
	* p-typeprint.c (pascal_type_print_base): Ditto
	* p-valprint.c (pascal_val_print): Ditto.
	* stabsread.c (read_cfront_member_functions): Ditto.
	(read_member_functions): Ditto.
	(cleanup_undefined_types): Ditto.
	* valprint.c (val_print): Ditto.
	* valops.c (hand_function_call): Remove is_prototyped
	variable and just use type flag test macro directly.
2001-12-12 02:11:52 +00:00
Fred Fish e9e79dd9fc Approved by Jim Blandy:
2001-12-11  Fred Fish  <fnf@redhat.com>

	* gdbtypes.c (print_bound_type): New function.
	(recursive_dump_type): Print type struct code values
	TYPE_CODE_BITSTRING, TYPE_CODE_COMPLEX, TYPE_CODE_TEMPLATE,
	and TYPE_CODE_TEMPLATE_ARG.
	(recursive_dump_type): Print type struct members
	upper_bound_type, lower_bound_type, cv_type, and as_type.
	Also always print the tagname member, even when it is NULL.

	* testsuite/gdb.base/maint.exp: Update to match changes in
	type dumping code.
2001-12-12 02:07:12 +00:00
Fred Fish 762a036f9a Approved by Jim Blandy:
2001-12-09  Fred Fish  <fnf@redhat.com>
	* gdbtypes.c (TYPE_FLAG_UNSIGNED, TYPE_FLAG_STUB): Use
	TYPE_UNSIGNED and TYPE_NOSIGN to determine when to print these
	rather than testing the bits directly.
	(TYPE_FLAG_NOSIGN, TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC,
	TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_PROTOTYPED,
	TYPE_FLAG_INCOMPLETE, TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE,
	TYPE_FLAG_VARARGS): Test for and print these bits as well.
2001-12-10 06:23:21 +00:00
Fred Fish 34a2fedd5a Approved by Jim Blandy:
2001-12-09  Fred Fish  <fnf@redhat.com>
	* gdbtypes.c (build_gdbtypes): For builtin_type_char, pass
	TYPE_FLAG_NOSIGN to init_type() rather than setting it after the
	type is created.
2001-12-10 06:19:51 +00:00
Fred Fish 7e956337e5 Approved by Jim Blandy:
2001-12-09  Fred Fish  <fnf@redhat.com>
	* gdbtypes.c (allocate_stub_method): Replace hand crafted type
	initialization with call to the init_type() function.
2001-12-10 06:13:11 +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 e371b258f8 * gdbtypes.c (_initialize_gdbtypes): Set floating-point type for
builtin_type_i387_ext to floatformat_i387_ext.
2001-10-28 12:43:12 +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 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
Andrew Cagney 502dcf4e39 Always initialize `p'. 2001-04-30 17:09:19 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table.  This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h".  These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted.  These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
2001-04-27 00:19:09 +00:00
Andrew Cagney 3c37485b16 malloc() -> xmalloc.
Move malloc() decl to utils.c
2001-03-20 01:37:10 +00:00
J.T. Conklin 5565b5569b 2001-03-06 J.T. Conklin <jtc@redback.com>
* symtab.h (decode_line_1): Removed declaration.

        * symfile.c (#include <assert.h>): Removed.

        * arch-utils.c (#include <ctype.h>): Removed.
        * c-typeprint.c: Likewise.
        * dbxread.c: Likewise.
        * gdbtypes.c: Likewise.
        * target.c: Likewise.
        * os9kread.c: Likewise.

        * c-valprint.c (#include "demangle.h"): Removed.
        * ch-typeprint.c: Likewise.
        * eval.c: Likewise.
        * f-typeprint.c: Likewise.
        * f-valprint.c: Likewise.
        * m2-typeprint.c: Likewise.
        * typeprint.c: Likewise.
        * p-typeprint.c: Likewise.
        * valarith.c: Likewise.
        * valprint.c: Likewise.

        * m2-typeprint.c (#include "gdb_string.h"): Removed.
        * nlmread.c: Likewise.

        * mdebugread.c (#include "gdb-stabs.h"): Removed.
        * minsyms.c: Likewise.
        * mipsread.c: Likewise.
        * nlmread.c: Likewise.

        * m2-typeprint.c (#include "obstack.h"): Removed.
        * m2-valprint.c: Likewise.

        * event-loop.c (#include <setjmp.h>): Removed.
2001-03-07 02:57:08 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Andrew Cagney 7f7e9482db * remote.c (remote_write_bytes): Add default case to switch
initializing ``todo''. Ditto for ``nr_bytes''.
* top.c (catch_errors): Always initialize ``val''.
* solib.c (info_sharedlibrary_command): Handle bfd_get_arch_size
returning an unknown size.
* gdbtypes.c (count_virtual_fns): Always initialize ``vfuncs''.
* breakpoint.c (break_at_finish_at_depth_command_1): Initialise
extra_args to NULL.
(break_at_finish_command_1): Ditto.
2000-11-27 02:18:44 +00:00
David Anderson 8c990f3c14 Corrected spelling in comment: extention-> to extension. 2000-09-02 00:05:02 +00:00
David Taylor 52204a0b3a Fri Aug 25 12:11:21 2000 David Taylor <taylor@texas.cygnus.com>
* symtab.c (search_symbols): Fix off by one error in index for
 	initializing variables ourtype, ourtype2, ourtype3, and ourtype4.
	(symtab_symbol_info): fix similar off by one error.

Fri Aug 25 12:03:15 2000  David Taylor  <taylor@texas.cygnus.com>

	* gdbarch.sh (TARGET_ADDR_BIT): New macro for the number
	of bits in gdb's representation of a target address.
	* gdbarch.c, gdbarch.h: Regenerated.
	* gdbtypes.c (build_gdbtypes): Use TARGET_ADDR_BIT instead of
 	TARGET_PTR_BIT when initializing builtin_type_CORE_ADDR.
	* printcmd.c (print_address_numeric): Use TARGET_ADDR_BIT instead
 	of TARGET_PTR_BIT, because we're printing an address, not a pointer.
2000-08-25 20:51:19 +00:00