smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
Use type architecture instead of current_gdbarch.
* gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH paramter.
* gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH parameter. Use it instead of current_gdbarch.
* c-typeprint.c (c_type_print_modifier): Update call.
* parse.c (push_type_address_space): Likewise.
* findvar.c (extract_typed_address, store_typed_address): Use type
architecture instead of current_gdbarch.
* value.c (value_as_address, unpack_field_as_long): Use type architecture
instead of current_gdbarch.
* doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
instead of current_gdbarch.
(floatformat_from_type): Pass type architecture.
* infcall.c (find_function_addr): Use type architecture instead
of current_gdbarch.
* valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
value_bit_index): Use type architecture instead of current_gdbarch.
* valops.c (value_cast, value_slice): Likewise.
* value.h (modify_field): Add TYPE argument.
* value.c (modify_field): Add TYPE argument. Use type architecture
instead of current_gdbarch.
(set_internalvar_component): Likewise.
* eval.c (evaluate_struct_tuple): Update call.
* valops.c (value_assign): Likewise.
* ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
(make_array_descriptor): Update calls.
(move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
current_gdbarch.
(ada_value_assign, value_assign_to_component): Update calls.
(decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
value_assign_to_component): Use type arch instead of current_gdbarch.
* printcmd.c (float_type_from_length): Remove GDBARCH argument,
use type architecture instead.
(print_scalar_formatted, printf_command): Update calls. Use type
architecture instead of current_gdbarch.
* valprint.c (val_print_type_code_int): Use type architecture
instead of current_gdbarch.
* varobj.c (value_get_print_value): Likewise.
* python/python-prettyprint.c (print_string_repr): Add GDBARCH
argument. Use it instead of current_gdbarch.
(apply_val_pretty_printer): Update call.
* ada-valprint.c (ada_val_print_1): Use type architecture instead
of current_gdbarch.
* c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(c_val_print): Update calls passing type architecture.
* f-valprint.c (f_val_print): Use type architecture instead of
current_gdbarch.
* jv-valprint (java_value_print): Likewise.
* m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(print_unpacked_pointer): Update calls passing type architecture.
* scm-valprint.c (scm_scmval_print): Use type architecture instead of
current_gdbarch.
* gnu-v3-abi.c (get_class_arch): Remove.
(gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
special-case check for Java classes.
(gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
Use get_type_arch instead of get_class_arch.
(builtin_type_true_unsigned_char): Likewise.
(struct builtin_type): Add builtin_true_char and
builtin_true_unsigned_char members.
* gdbtypes.c (builtin_type_true_char): Remove.
(builtin_type_true_unsigned_char): Likewise.
(_initialize_gdbtypes): Do not initialize them.
(gdbtypes_post_init): Initialize builtin_true_char and
builtin_true_unsigned_char members of builtin_type.
* printcmd.c (print_scalar_formatted): Use builtin_type
members instead of builtin_type_true_char and
builtin_type_true_unsigned_char.
* ada-valprint.c (ada_val_print_1): Likewise.
* gdbtypes.c (builtin_type_void): Remove.
(_initialize_gdbtypes): Do not initialize it.
(safe_parse_type): Add GDBARCH argument. Use it to construct
void return type.
(check_stub_method): Update call.
* infcall.c (call_function_by_hand): Use platform-specific type
instead of builtin_type_void.
* valops.c (value_cast): Use input void type instead of
builtin_type_void.
* gdbtypes.c (gdbtypes_post_init): Initialize it.
* value.c (internal_fn_type): Remove.
(_initialize_values): Do not initialize it.
* value.c (struct internalvar): Add enum internalvar_kind type and
kind member. Restructure union internalvar_data type. Remove type,
canonical, and make_value members.
(init_if_undefined_command): Update for data structure changes.
(create_internalvar): Likewise.
(create_internalvar_type_lazy): Likewise.
(get_internalvar_integer): Likewise.
(get_internalvar_function): Likewise.
(set_internalvar_component): Likewise.
(set_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(set_internalvar_function): Likewise.
(clear_internalvar): Likewise.
(add_internal_function): Likewise.
(preserve_one_internalvar): New function.
(preserve_values): Call it.
* value.h (value_of_internalvar): Add GDBARCH parameter.
(internalvar_make_value): Likewise.
* value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
make_value callback. Use it to generate per-architecture result value
types for internal variables with no pre-defined type. Update for data
structure changes.
(show_convenience): Pass architecture to value_of_internalvar.
* eval.c (evaluate_subexp_standard): Likewise.
* infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
instead of current frame architecture. Return per-architecture type.
* value.h (set_internalvar_string): Add prototype.
* value.c (set_internalvar_string): New function.
* tracepoint.c (set_traceframe_context): Use it.
* gdbtypes.h (create_string_type): Add character type argument.
* dwarf2read.c (read_tag_string_type): Pass character type to
create_string_type.
* value.h (value_string): Add character type argument.
* valops.c (value_string): Add character type argument. Pass it to
create_string_type. Do not allocate space in inferior.
* valarith.c (value_concat): Pass character type to value_string.
* value.h (value_typed_string): Rename to ...
(value_cstring): ... this.
* valops.c (value_typed_string): Rename to ...
(value_cstring): ... this.
* c-lang.c (evaluate_subexp_c): Update.
* python/python-value.c (builtin_type_pychar): New define.
(convert_value_from_python): Call value_cstring instead
of value_from_string.
* value.c (value_from_string): Remove.
* value.h (value_from_string): Remove.
* eval.c (evaluate_subexp_standard): Pass character type to
value_string. Pass expression architecture to value_nsstring
and lookup_child_selector.
* objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
(lookup_child_selector): Likewise.
(value_nsstring): Likewise.
* objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
Pass character type to value_string..
(lookup_child_selector): Likewise.
(value_nsstring): Add GDBARCH parameter, use it instead of
objfile architecture. Pass architecture to lookup_objc_class
and lookup_child_selector. Pass character type to value_string.
(end_msglist): Pass architecture to lookup_objc_class.
* objc-exp.y: Pass architecture to lookup_objc_class.
(lookup_typename): Add LANGUAGE and GDBARCH parameters.
(lookup_unsigned_typename): Likewise.
(lookup_signed_typename): Likewise.
* gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
Use them instead of current_language and current_gdbarch.
(lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
Pass them to lookup_typename.
(lookup_signed_typename): Likewise.
* c-exp.y: Pass parse_language and parse_gdbarch to
lookup_unsigned_typename and lookup_signed_typename.
* objc-exp.y: Likewise.
* m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
* c-lang.c (evaluate_subexp_c): Pass expression language and
gdbarch to lookup_typename.
* printcmd.c (printf_command): Pass current language and
gdbarch to lookup_typename.
* python/python-type.c (typy_lookup_typename): Likewise.
Include "language.h".
Make specifiable the make_function_type type memory ownership.
* gdbtypes.c (make_function_type): New parameter `objfile', use it
explicitely instead of TYPE-initialized removed local variable
`objfile'. Describe `objfile' it in the function comment.
(lookup_function_type): Update make_function_type callers.
* gdbtypes.h (make_function_type): Update the prototype.
* jv-lang.c (java_link_class_type): Update make_function_type callers.
* dwarf2read.c (read_subroutine_type): Likewise.
* stabsread.c (read_type): Likewise.
preparation for supporting DW_AT_byte_stride.
* ada-lang.c (packed_array_type, ada_index_type): Use TYPE_INDEX_TYPE.
(ada_array_bound_from_type): Move `index_type' declaration to the
function start. New variable `retval'. Return the bounds for
TYPE_CODE_RANGE using TYPE_LOW_BOUND and TYPE_HIGH_BOUND. Abort on
invalid index type codes.
* ada-typeprint.c (print_range): Set `upper_bound' for TYPE_CODE_RANGE
now using TYPE_HIGH_BOUND.
* ada-valprint.c (val_print_packed_array_elements): Use `index_type'.
* eval.c (evaluate_subexp_standard): Use TYPE_INDEX_TYPE.
* gdbtypes.c (create_range_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
refer to the number of fields only through TYPE_NFIELDS.
(create_array_type): Use TYPE_INDEX_TYPE.
(check_typedef): Use TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND.
* gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED)
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Use TYPE_INDEX_TYPE.
(TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): Use
TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* hppa-tdep.c (hppa_alignof <TYPE_CODE_ARRAY>): Use TYPE_INDEX_TYPE.
* mdebugread.c (parse_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* valarith.c (value_bit_index): Use TYPE_INDEX_TYPE.
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
valops.c (value_cast), varobj.c (c_number_of_children): Replace
TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
(f77_get_upperbound): ... this function handling now only
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
(f77_get_dynamic_lowerbound): Replace with ...
(f77_get_lowerbound): ... this function handling now only
TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
Update their callers.
* eval.c (evaluate_subexp_standard): Update their callers.
* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
prototypes.
(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
the lower_bound_was_default variable. Update the
f77_get_dynamic_upperbound, f77_get_upperbound and
TYPE_ARRAY_UPPER_BOUND_TYPE calls.
* gdbtypes.c (print_bound_type): Remove the function.
(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
LOWER_BOUND_TYPE.
* gdbtypes.h (enum array_bound_type): Remove.
(struct main_type): Remove the fields upper_bound_type and
lower_bound_type. Comment the new overload of the field artificial.
(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
gdb/testsuite/
* gdb.base/maint.exp (maint print type): Remove printing
UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
and builtin_true_unsigned_char.
(builtin_type_true_char): Remove macro, add extern declaration.
(builtin_type_true_unsigned_char): Add extern declaration.
* gdbtypes.c (builtin_type_true_char): New global variable.
(builtin_type_true_unsigned_char): Likewise.
(_initialize_gdbtypes): Initialize them.
(gdbtypes_post_init): Do not initialize builtin_true_char
and builtin_true_unsigned_char members of struct builtin_type.
* printcmd.c (print_scalar_formatted): Do not use builtin_type;
use builtin_type_true_unsigned_char instead.
* ada-valprint.c (ada_val_print_1): Use builtin_type_true_char
instead of builtin_type_char for internal string.
(builtin_type_f_void): Remove macro.
* gdbtypes.c (builtin_type_void): New global variable.
(_initialize_gdbtypes): Initialize it.
* gnu-v3-abi.c (build_gdb_vtable_type): Do not call
lookup_pointer_type or lookup_function_type on builtin_type_void.
* printcmd.c (set_next_address): Likewise.
* objc-lang.c (value_nsstring): Likewise.
* mt-tdep.c (mt_copro_register_type): Likewise.
* xtensa-tdep.c (xtensa_register_type): Likewise.
* symfile.c (syms_from_objfile): Remove special handling
of builtin_type_void and builtin_type_char.
* gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
Return basetype, fieldno if found. All callers updated.
Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
objfile.
* gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
* symfile.h (fill_in_vptr_fieldno): Delete.
* gdb.cp/gdb2384.exp: New file.
* gdb.cp/gdb2384.cc: New file.
* gdb.cp/gdb2384-base.h: New file.
* gdb.cp/gdb2384-base.cc: New file.
of FT_INTEGER fundamental type for array range index type.
(decode_base_type): Use builtin types of current_gdbarch
instead of fundamental types.
* dwarf2read.c (struct dwarf2_cu): Remove ftypes member.
(read_file_scope): Do not initialize ftypes member.
(dwarf_base_type, dwarf2_fundamental_types): Remove functions.
(read_array_type): Use builtin_type_int32 instead of FT_INTEGER
fundamental type for array range index type.
(read_tag_string_type): Likewise for string range index type.
Also, do not overwrite FT_CHAR type with new string type.
(read_base_type): If DW_AT_name is missing, create unnamed type
with given properties instead of looking for a fundamental type.
Create new types as TYPE_TARGET_TYPE for DW_ATE_address and
DW_ATE_complex_float types.
(read_subrange_type): Create new type to represent missing
DW_AT_type instead of looking for a fundamental type.
(die_type): Use builtin type to represent "void" instead of
looking for a fundamental type.
* stabsread.c (define_symbol): Use builtin types to represent
'r' and 'i' floating-point and integer constants.
* gdbtypes.c (lookup_fundamental_type): Remove.
* gdbtypes.h (lookup_fundamental_type): Remove prototype.
(FT_VOID, FT_BOOLEAN, FT_CHAR, FT_SIGNED_CHAR, FT_UNSIGNED_CHAR,
FT_SHORT, FT_SIGNED_SHORT, FT_UNSIGNED_SHORT, FT_INTEGER,
FT_SIGNED_INTEGER, FT_UNSIGNED_INTEGER, FT_LONG, FT_SIGNED_LONG,
FT_UNSIGNED_LONG, FT_LONG_LONG, FT_SIGNED_LONG_LONG,
FT_UNSIGNED_LONG_LONG, FT_FLOAT, FT_DBL_PREC_FLOAT, FT_EXT_PREC_FLOAT,
FT_COMPLEX, FT_DBL_PREC_COMPLEX, FT_EXT_PREC_COMPLEX, FT_STRING,
FT_FIXED_DECIMAL, FT_FLOAT_DECIMAL, FT_BYTE, FT_UNSIGNED_BYTE,
FT_TEMPLATE_ARG, FT_DECFLOAT, FT_DBL_PREC_DECFLOAT,
FT_EXT_PREC_DECFLOAT, FT_NUM_MEMBERS): Remove macros.
* objfiles.c (struct objfile): Remove fundamental_types member.
* symfile.c (reread_symbols): Do not clear fundamental_types.
* language.h (struct language_defn): Remove la_fund_type member.
(create_fundamental_type): Remove.
* language.c (unk_lang_create_fundamental_type): Remove.
(unknown_language_defn, auto_language_defn,
local_language_defn): Adapt initializer.
* ada-lang.c (ada_create_fundamental_type): Remove.
(ada_language_defn): Adapt initializer.
* c-lang.h (c_create_fundamental_type): Remove prototype.
* c-lang.c (c_create_fundamental_type): Remove.
(c_language_defn, cplus_language_defn, asm_language_defn,
minimal_language_defn): Adapt initializer.
* f-lang.c (f_create_fundamental_type): Remove.
(f_language_defn): Adapt initializer.
* jv-lang.c (java_create_fundamental_type): Remove.
(java_language_defn): Adapt initializer.
* m2-lang.c (m2_create_fundamental_type): Remove.
(m2_language_defn): Adapt initializer.
* objc-lang.c (objc_create_fundamental_type): Remove.
(objc_language_defn): Adapt initializer.
* p-lang.h (pascal_create_fundamental_type): Remove prototype.
* p-lang.c (pascal_create_fundamental_type): Remove.
(pascal_language_defn): Adapt initializer.
* scm-lang.c (scm_language_defn): Adapt initializer.
Thiago Jung Bauermann <bauerman@br.ibm.com>
* c-lang.c (c_create_fundamental_type): Create fundamental
types for DFP.
* c-typeprint.c (c_type_print_varspec_prefix): Add
TYPE_CODE_DECFLOAT to no prefix needed case.
(c_type_print_varspec_suffix): Add TYPE_CODE_DECFLOAT to no
suffix needed case.
* c-valprint.c (c_val_print): Call print_decimal_floating to
print DFP values.
* dwarf2read.c (read_base_type): Read DW_ATE_decimal_float
attribute code and return TYPE_CODE_DECFLOAT.
(dwarf_base_type): Set dwarf2_fundamental_type for DFP values.
* gdbtypes.c (gdbtypes_post_init): Initialize builtin_decfloat,
builtin_decdouble and builtin_declong.
* gdbtypes.h (enum type_code): Add TYPE_CODE_DECFLOAT as a
type code for DFP.
(FT_DECFLOAT, FT_DBL_PREC_DECFLOAT, FT_EXT_PREC_DECFLOAT): New
types, for decimal floating point.
(FT_NUM_MEMBERS): Increment, new types added.
(struct builtin_type): Add builtin_decfloat, builtin_decdouble
and builtin_declong.
* valprint.c (print_decimal_floating): New function to print DFP
values.
* value.h (print_decimal_floating): Prototype.
* c-valprint.c (textual_element_type): New.
(c_val_print): Use it. Do not skip address printing for pointers
with a string format.
(c_value_print): Doc update.
* dwarf2read.c (read_array_type): Use make_vector_type.
* gdbtypes.c (make_vector_type): New.
(init_vector_type): Use it.
(gdbtypes_post_init): Initialize builtin_true_unsigned_char.
(_initialize_gdbtypes): Mark int8_t and uint8_t as TYPE_FLAG_NOTTEXT.
* gdbtypes.h (struct builtin_type): Add builtin_true_unsigned_char.
(TYPE_FLAG_NOTTEXT, TYPE_NOTTEXT): New.
(make_vector_type): New.
* printcmd.c (print_formatted): Only handle 's' and 'i' for examine.
Call the language print routine for string format.
(print_scalar_formatted): Call val_print for string format. Handle
unsigned original types for char format.
(validate_format): Do not reject string format.
* stabsread.c (read_type): Use make_vector_type.
* xml-tdesc.c (tdesc_start_vector): Use init_vector_type.
* gdb.texinfo (Output Formats): Update 'c' description. Describe 's'.
(Examining Memory): Update mentions of the 's' format.
(Automatic Display): Likewise.
* gdb.arch/i386-sse.exp: Do not expect character constants.
* gdb.base/charsign.c, gdb.base/charsign.exp: Delete.
* gdb.base/display.exp: Allow print/s.
* gdb.base/printcmds.exp, gdb.base/setvar.exp: Revert signed
and unsigned char array changes.
nodebug_data_symbol, nodebug_unknown_symbol, and nodebug_tls_symbol.
* gdbtypes.c (gdbtypes_post_init): Initialize nodebug_ default types.
* parse.c (msym_text_symbol_type, msym_data_symbol_type): Remove.
(msym_unknown_symbol_type, msym_tls_symbol_type): Remove.
(write_exp_msymbol): Use builtin nodebug_ types instead of them.
(build_parse): Remove.
(_initialize_parse): Do not call build_parse. Do not register
msym_ types for gdbarch-swapping.
* dwarf2read.c (new_symbol): Use default nodebug_data_symbol type
instead of creating private type.
* xcoffread.c (func_symbol_type, var_symbol_type): Remove.
(_initialize_xcoffread): Do not initialized them.
(process_xcoff_symbol): Use builtin nodebug_ types instead of them.
* mdebugread.c (nodebug_func_symbol_type): Remove.
(nodebug_var_symbol_type): Remove.
(_initialize_mdebugread): Do not initialize them.
(parse_symbol): Use builtin nodebug_ type instead of them.
(parse_procedure): Likewise.
builtin_type_m2_card, builtin_type_m2_real, builtin_type_m2_bool):
Replace global variable declaration with compatibility macro.
(struct builtin_m2_type): New data type.
(builtin_m2_type): Add prototype.
* m2-lang.c (builtin_type_m2_char, builtin_type_m2_int,
builtin_type_m2_card, builtin_type_m2_real, builtin_type_m2_bool):
Remove global variables.
(m2_language_arch_info): Use builtin_m2_type instead of variables.
(build_m2_types): New function.
(m2_type_data): New variable.
(builtin_m2_type): New function.
(_initialize_m2_language): Do not build data types. Register
m2_type_data per-gdbarch data.
builtin_type_f_logical_s1, builtin_type_f_logical_s2,
builtin_type_f_integer, builtin_type_f_integer_s2, builtin_type_f_real,
builtin_type_f_real_s8, builtin_type_f_real_s16,
builtin_type_f_complex_s8, builtin_type_f_complex_s16,
builtin_type_f_complex_s32, builtin_type_f_void): Replace global
variable declaration with compatibility macro.
(struct builtin_f_type): New data type.
(builtin_f_type): Add prototype.
* f-lang.c (builtin_type_f_character, builtin_type_f_logical,
builtin_type_f_logical_s1, builtin_type_f_logical_s2,
builtin_type_f_integer, builtin_type_f_integer_s2, builtin_type_f_real,
builtin_type_f_real_s8, builtin_type_f_real_s16,
builtin_type_f_complex_s8, builtin_type_f_complex_s16,
builtin_type_f_complex_s32, builtin_type_f_void): Remove variables.
(f_language_arch_info): Use builtin_f_type instead of variables.
(build_fortran_types): Build builtin_f_type structure instead of
setting global type variables.
(f_type_data): New variable.
(builtin_f_type): New function.
(_initialize_f_language): Do not call build_fortran_types. Do not
swap global type variables. Register f_type_data per-gdbarch data.
* gdbarch.c, gdbarch.h: Regenerate.
* gdbtypes.h (builtin_bfd_vma_type): Remove.
* gdbtypes.h (builtin_bfd_vma_type): Remove.
(build_gdbtypes): Do not initialize it.
(_initialize_gdbtypes): Do not swap it.
builtin_type_v2_int64, builtin_type_v4_int32, builtin_type_v8_int16,
builtin_type_v16_int8, builtin_type_v2_float, builtin_type_v2_int32,
builtin_type_v4_int16, builtin_type_v8_int8, builtin_type_v4sf,
builtin_type_v4si, builtin_type_v16qi, builtin_type_v8qi,
builtin_type_v8hi, builtin_type_v4hi, builtin_type_v2si,
builtin_type_vec64, builtin_type_vec128): Remove.
(init_simd_type): Remove.
(init_vector_type): Make global.
(build_builtin_type_vec64, build_builtin_type_vec128): Remove.
(build_gdbtypes): Do not build vector types.
(_initialize_gdbtypes): Do not swap vector types.
* gdbtypes.h (builtin_type_v2_double, builtin_type_v4_float,
builtin_type_v2_int64, builtin_type_v4_int32, builtin_type_v8_int16,
builtin_type_v16_int8, builtin_type_v2_float, builtin_type_v2_int32,
builtin_type_v4_int16, builtin_type_v8_int8, builtin_type_v4sf,
builtin_type_v4si, builtin_type_v16qi, builtin_type_v8qi,
builtin_type_v8hi, builtin_type_v4hi, builtin_type_v2si,
builtin_type_vec64, builtin_type_vec128): Remove declarations.
(init_vector_type): Add prototype.
* i386-tdep.h (struct gdbarch_tdep): Add i386_mmx_type and
i386_sse_type members.
(i386_mmx_type, i386_sse_type): Change from variables to functions.
* i386-tdep.c (i386_mmx_type, i386_sse_type): Remove variables.
(i386_init_types): Do not build vector types.
(i386_mmx_type, i386_sse_type): New functions.
(i386_register_type): Call them instead of using global variables.
(i386_gdbarch_init): Use XCALLOC to allocate tdep structure.
* amd64-tdep.c (amd64_register_type): Call i386_sse_type instead
of using global variable.
* rs6000-tdep.h (struct gdbarch_tdep): Add ppc_builtin_type_vec64
and ppc_builtin_type_vec128 members.
* rs6000-tdep.c (rs6000_builtin_type_vec64): New function.
(rs6000_builtin_type_vec128): Likewise.
(rs6000_register_type): Call them instead of using builtin_type_vec64
and builtin_type_vec128.
(rs6000_gdbarch_init): Use XCALLOC to allocate tdep structure.
* spu-tdep.c (struct gdbarch_tdep): New data type.
(spu_builtin_type_vec128): Remove variable.
(spu_builtin_type_vec128): New function.
(spu_register_type): Call it instead of using global variable.
(spu_gdbarch_init): Allocate tdep structure.
(spu_init_vector_type): Remove function.
(_initialize_spu_tdep): Do not call it.
macros.
(TYPE_IS_OPAQUE): Empty vs. opaque structures are now
distinct on the TYPE_STUB_SUPPORTED debug targets.
* dwarf2read.c (read_structure_type): Set TYPE_FLAG_STUB_SUPPORTED.
* Makefile.in (gnu-v3-abi.o): Delete special rule.
(eval.o, gnu-v3-abi.o, ia64-tdep.o): Update.
* ada-valprint.c (ada_print_scalar): Update for new type codes.
* c-typeprint.c (c_print_type): Update for new type codes.
(c_type_print_varspec_prefix, c_type_print_varspec_suffix)
(c_type_print_base): Likewise.
(c_type_print_args): Rewrite.
* c-valprint.c (c_val_print): Update for new type codes. Remove
support for references to members. Treat methods like functions.
* cp-abi.c (cplus_print_method_ptr, cplus_method_ptr_size)
(cplus_make_method_ptr, cplus_method_ptr_to_value): New.
* cp-abi.h (cplus_print_method_ptr, cplus_method_ptr_size)
(cplus_make_method_ptr, cplus_method_ptr_to_value): New prototypes.
(struct cp_abi_ops): Add corresponding members.
* cp-valprint.c (cp_print_class_method): Delete.
(cp_find_class_member): New function.
(cp_print_class_member): Use it. Simplify support for bogus
member pointers.
* dwarf2read.c (quirk_gcc_member_function_pointer): Use
lookup_methodptr_type.
(read_tag_ptr_to_member_type): Likewise, and lookup_memberptr_type.
* eval.c (evaluate_subexp_standard): Implement EVAL_SKIP for
OP_SCOPE. Update call to value_aggregate_elt. Rewrite member
pointer support.
(evaluate_subexp_for_address): Handle OP_SCOPE explicitly. Handle
references returned by user defined operators.
* f-typeprint.c (f_print_type, f_type_print_varspec_prefix)
(f_type_print_varspec_suffix): Remove support for member pointers.
* gdbtypes.c (lookup_memberptr_type): Renamed from lookup_member_type
and adjusted.
(smash_to_memberptr_type): Likewise, from smash_to_member_type.
(lookup_methodptr_type): New.
(rank_one_type): Adjust for TYPE_CODE_MEMBERPTR.
(recursive_dump_type): Update for new types.
* gdbtypes.h (enum type_code): Replace TYPE_CODE_MEMBER with
TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR.
(lookup_memberptr_type, lookup_methodptr_type)
(smash_to_memberptr_type): New prototypes.
(smash_to_method_type): Formatting fix.
(lookup_member_type, smash_to_member_type): Delete prototypes.
* gnu-v3-abi.c (gnuv3_get_vtable, gnuv3_get_virtual_fn): New.
Do not rely on debug information for the vptr or the method's
enclosing type. Handle function descriptors for IA64.
(gnuv3_virtual_fn_field): Rewrite using the new functions.
(gnuv3_find_method_in, gnuv3_print_method_ptr)
(gnuv3_method_ptr_size, gnuv3_make_method_ptr)
(gnuv3_method_ptr_to_value): New.
(init_gnuv3_ops): Set new members of gnu_v3_abi_ops.
* hpread.c (hpread_type_lookup): Update for new types.
* infcall.c (value_arg_coerce): Likewise.
* m2-typeprint.c (m2_print_type): Remove explicit support
for member pointers.
* m2-valprint.c (m2_val_print): Likewise.
* p-typeprint.c (pascal_type_print_varspec_prefix)
(pascal_type_print_varspec_suffix, pascal_type_print_base): Likewise.
* p-valprint.c (pascal_val_print): Likewise.
(pascal_object_print_class_method, pascal_object_print_class_member):
Delete.
* p-lang.h (pascal_object_print_class_method)
(pascal_object_print_class_member): Delete prototypes.
* stabsread.c (read_type): Update for new types.
* typeprint.c (print_type_scalar): Likewise.
* valops.c (value_struct_elt_for_reference, value_namespace_elt)
(value_maybe_namespace_elt, value_aggregate_elt): Add want_address
argument. Construct a pointer to member if the address of a
function or data member is requested.
(value_cast_pointers): Don't modify the input value.
(value_cast): Adjust pointer to member handling for new types.
Allow null pointer to member constants. Don't modify the input
value.
(value_ind): Remove pointer to member check. Handle function
descriptors for function pointers.
(value_struct_elt, value_find_oload_method_list, check_field):
Remove pointer to member checks.
* value.c (unpack_long): Allow pointers to data members.
(value_from_longest): Allow member pointers.
* value.h (value_aggregate_elt): Add want_address.
* varobj.c (c_variable_editable): Remove check for members.
* gdbarch.sh: Add vtable_function_descriptors and vbit_in_delta.
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Handle descriptors
in virtual tables.
(ia64_gdbarch_init): Call set_gdbarch_vtable_function_descriptors.
* c-lang.h (cp_print_class_method): Delete prototype.
* arm-tdep.c (arm_gdbarch_init): Call set_gdbarch_vbit_in_delta.
* mips-tdep.c (mips_gdbarch_init): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* gdb.cp/classes.exp (test_pointers_to_class_members): Update expected
output. Test the types of members and member pointers.
* gdb.cp/inherit.exp (test_print_mi_member_types): Remove KFAILs for
gdb/2092.
* gdb.cp/member-ptr.exp: Search for a comment instead of a
statement. Enable for GCC. Update expected output for some tests
and add new tests. Remove obsolete GCC KFAILs. Allow GCC's class
layout.
* gdb.cp/member-ptr.cc (Padding, Padding::vspacer, Base, Base::get_x)
(Base::vget_base, Left, Left::vget, Right, Right::vget, Diamond)
(Diamond::vget_base): New.
(main): Add new tests.
* gdb.cp/printmethod.exp: Update expected output for member functions.
* gdb.cp/virtfunc.exp (test_virtual_calls): Add a KFAIL for
print pEe->D::vg().