* 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.
* 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.
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.
* gdbtypes.c : Add new builtin type for 64 bit vectors.
(build_gdbtypes): Build builtin_type_v2_float.
(_initialize_gdbtypes): Register new builtin type.
* 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).
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.
[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.
* 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-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-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-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-09 Fred Fish <fnf@redhat.com>
* gdbtypes.c (allocate_stub_method): Replace hand crafted type
initialization with call to the init_type() function.
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.
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).
* 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.
equivalence.
(rank_one_type): Use strcmp instead of == to compare type names.
Don't swap parm with arg when checking TYPE_CODE_REF types.
* valops.c (find_overload_match): Fix indentation. Compare
parameter rankings to 0..9, 10..99, and 100+ instead of 0, 10,
and 100.
error() during parse_and_eval_type().
(check_stub_method): Call safe_parse_type instead of
parse_and_eval_type().
* wrapper.c (gdb_parse_and_eval_type): New wrapper function.
(wrap_parse_and_eval_type): New support function.
* wrapper.h (gdb_parse_and_eval_type): Prototype.
(wrap_parse_and_eval_type): Prototype.