instead of builtin_type_int as default unspecified integral type.
(ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
assign_component, to_fixed_range_type): Likewise.
* ada-typeprint.c (print_range, print_range_bound,
print_range_type_named): Likewise.
* ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
* eval.c (evaluate_subexp_standard): Likewise.
* gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
build_gdb_vtable_type): Likewise.
* jv-lang.c (java_array_type): Likewise.
* m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
* m2-valprint.c (m2_print_long_set): Likewise.
* parse.c (follow_types): Likewise.
* p-typeprint.c (pascal_type_print_base): Likewise.
* valops.c (value_one, value_array, value_string,
value_bitstring): Likewise.
* value.c (allocate_repeat_value, value_from_string): Likewise.
* varobj.c (c_describe_child): Likewise.
* mt-tdep.c (mt_register_type): Likewise.
* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
* sh64-tdep.c (sh64_build_float_register_type): Likewise.
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
+ instead of builtin_type_int as default unspecified integral type.
+ (ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
+ assign_component, to_fixed_range_type): Likewise.
+ * ada-typeprint.c (print_range, print_range_bound,
+ print_range_type_named): Likewise.
+ * ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
+ * eval.c (evaluate_subexp_standard): Likewise.
+ * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
+ * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
+ build_gdb_vtable_type): Likewise.
+ * jv-lang.c (java_array_type): Likewise.
+ * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
+ * m2-valprint.c (m2_print_long_set): Likewise.
+ * parse.c (follow_types): Likewise.
+ * p-typeprint.c (pascal_type_print_base): Likewise.
+ * valops.c (value_one, value_array, value_string,
+ value_bitstring): Likewise.
+ * value.c (allocate_repeat_value, value_from_string): Likewise.
+ * varobj.c (c_describe_child): Likewise.
+ * mt-tdep.c (mt_register_type): Likewise.
+ * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
+ * sh64-tdep.c (sh64_build_float_register_type): Likewise.
+
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
* gdbtypes.h (struct builtin_type): Remove builtin_true_char
ada_coerce_to_simple_array_type (struct type *type)
{
struct value *mark = value_mark ();
- struct value *dummy = value_from_longest (builtin_type_long, 0);
+ struct value *dummy = value_from_longest (builtin_type_int32, 0);
struct type *result;
deprecated_set_value_type (dummy, type);
result = ada_type_of_array (dummy, 0);
has a target type of TYPE_CODE_UNDEF. We compensate here, but
perhaps stabsread.c would make more sense. */
if (result_type == NULL || TYPE_CODE (result_type) == TYPE_CODE_UNDEF)
- result_type = builtin_type_int;
+ result_type = builtin_type_int32;
return result_type;
}
if (arr_type == NULL || !ada_is_simple_array_type (arr_type))
{
if (typep != NULL)
- *typep = builtin_type_int;
+ *typep = builtin_type_int32;
return (LONGEST) - which;
}
struct type *type =
ada_lookup_struct_elt_type (outer_type, name, 1, 1, NULL);
if (type == NULL)
- return builtin_type_int;
+ return builtin_type_int32;
else
return type;
}
struct value *elt;
if (TYPE_CODE (value_type (lhs)) == TYPE_CODE_ARRAY)
{
- struct value *index_val = value_from_longest (builtin_type_int, index);
+ struct value *index_val = value_from_longest (builtin_type_int32, index);
elt = unwrap_value (ada_value_subscript (lhs, 1, &index_val));
}
else
char *subtype_info;
if (raw_type == NULL)
- base_type = builtin_type_int;
+ base_type = builtin_type_int32;
else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
base_type = TYPE_TARGET_TYPE (raw_type);
else
case TYPE_CODE_ENUM:
break;
default:
- target_type = builtin_type_int;
+ target_type = builtin_type_int32;
break;
}
the upper bound of the 0 .. -1 range types to be printed as
a very large unsigned number instead of -1.
To workaround this stabs deficiency, we replace the TYPE by
- builtin_type_long when we detect that the bound is negative,
+ builtin_type_int32 when we detect that the bound is negative,
and the type is a TYPE_CODE_INT. The bound is negative when
'm' is the last character of the number scanned in BOUNDS. */
if (bounds[*n - 1] == 'm' && TYPE_CODE (type) == TYPE_CODE_INT)
- type = builtin_type_long;
+ type = builtin_type_int32;
ada_print_scalar (type, B, stream);
if (bounds[*n] == '_')
*n += 2;
char *subtype_info;
if (raw_type == NULL)
- base_type = builtin_type_int;
+ base_type = builtin_type_int32;
else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
base_type = TYPE_TARGET_TYPE (raw_type);
else
return 0;
break;
case TYPE_CODE_UNDEF:
- index_type = builtin_type_long;
+ index_type = builtin_type_int32;
/* FALL THROUGH */
default:
if (low_bound == 1)
make_pointer_type
(create_array_type
(NULL, builtin_type_true_char,
- create_range_type (NULL, builtin_type_int, 0, 32)), NULL);
+ create_range_type (NULL, builtin_type_int32, 0, 32)), NULL);
printable_val =
value_ind (value_cast (parray_of_char,
/* Construct a value node with the value of the offset */
- arg2 = value_from_longest (builtin_type_f_integer, offset_item);
+ arg2 = value_from_longest (builtin_type_int32, offset_item);
/* Let us now play a dirty trick: we will take arg1
which is a value node pointing to the topmost level
struct value *entry;
struct value *vfn;
struct value *vtbl;
- struct value *vi = value_from_longest (builtin_type_int,
+ struct value *vi = value_from_longest (builtin_type_int32,
(LONGEST) TYPE_FN_FIELD_VOFFSET (f, j));
struct type *fcontext = TYPE_FN_FIELD_FCONTEXT (f, j);
struct type *context;
FIELD_NAME (*field) = "vcall_and_vbase_offsets";
FIELD_TYPE (*field)
= create_array_type (0, ptrdiff_type,
- create_range_type (0, builtin_type_int, 0, -1));
+ create_range_type (0, builtin_type_int32, 0, -1));
FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
offset += TYPE_LENGTH (FIELD_TYPE (*field));
field++;
FIELD_NAME (*field) = "virtual_functions";
FIELD_TYPE (*field)
= create_array_type (0, ptr_to_void_fn_type,
- create_range_type (0, builtin_type_int, 0, -1));
+ create_range_type (0, builtin_type_int32, 0, -1));
FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
offset += TYPE_LENGTH (FIELD_TYPE (*field));
field++;
/* Fetch the appropriate function pointer from the vtable. */
vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions),
- value_from_longest (builtin_type_int, vtable_index));
+ value_from_longest (builtin_type_int32, vtable_index));
/* If this architecture uses function descriptors directly in the vtable,
then the address of the vtable entry is actually a "function pointer"
address));
vtable = value_at_lazy (vtable_type,
vtable_address - vtable_address_point_offset ());
- offset_val = value_from_longest(builtin_type_int, cur_base_offset);
+ offset_val = value_from_longest(builtin_type_int32, cur_base_offset);
vbase_array = value_field (vtable, vtable_field_vcall_and_vbase_offsets);
base_offset = value_as_long (value_subscript (vbase_array, offset_val));
return base_offset;
while (dims-- > 0)
{
- range_type = create_range_type (NULL, builtin_type_int, 0, 0);
+ range_type = create_range_type (NULL, builtin_type_int32, 0, 0);
/* FIXME This is bogus! Java arrays are not gdb arrays! */
type = create_array_type (NULL, type, range_type);
}
struct type *target = TYPE_TARGET_TYPE (type);
if (target == NULL)
- target = builtin_type_int;
+ target = builtin_type_int32;
if (TYPE_NFIELDS(type) == 0)
return;
range = TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i));
target = TYPE_TARGET_TYPE (range);
if (target == NULL)
- target = builtin_type_int;
+ target = builtin_type_int32;
l1 = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i)));
h1 = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, len-1)));
target = TYPE_TARGET_TYPE (range);
if (target == NULL)
- target = builtin_type_int;
+ target = builtin_type_int32;
if (get_discrete_bounds (range, &field_low, &field_high) >= 0)
{
break;
target = TYPE_TARGET_TYPE (range);
if (target == NULL)
- target = builtin_type_int;
+ target = builtin_type_int32;
}
}
if (element_seen)
if (copro_type == NULL)
{
struct type *temp;
- temp = create_range_type (NULL, builtin_type_unsigned_int, 0, 1);
+ temp = create_range_type (NULL, builtin_type_int32, 0, 1);
copro_type = create_array_type (NULL, builtin_type_int16, temp);
}
switch (regnum)
{
struct type *target = TYPE_TARGET_TYPE (type);
if (target == NULL)
- target = builtin_type_long;
+ target = builtin_type_int32;
print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
fputs_filtered ("..", stream);
print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
done with it. */
range_type =
create_range_type ((struct type *) NULL,
- builtin_type_int, 0,
+ builtin_type_int32, 0,
array_size >= 0 ? array_size - 1 : 0);
follow_type =
create_array_type ((struct type *) NULL,
{
struct type *temp;
- temp = create_range_type (NULL, builtin_type_int, 0, high);
+ temp = create_range_type (NULL, builtin_type_int32, 0, high);
return create_array_type (NULL, builtin_type_float, temp);
}
{
struct type *temp;
- temp = create_range_type (NULL, builtin_type_int, 0, high);
+ temp = create_range_type (NULL, builtin_type_int32, 0, high);
return create_array_type (NULL, builtin_type_float, temp);
}
if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT)
{
- struct value *int_one = value_from_longest (builtin_type_int, 1);
+ struct value *int_one = value_from_longest (builtin_type_int32, 1);
struct value *val;
gdb_byte v[16];
- decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int));
+ decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int32));
val = value_from_decfloat (type, v);
}
else if (TYPE_CODE (type1) == TYPE_CODE_FLT)
}
rangetype = create_range_type ((struct type *) NULL,
- builtin_type_int,
+ builtin_type_int32,
lowbound, highbound);
arraytype = create_array_type ((struct type *) NULL,
value_enclosing_type (elemvec[0]),
struct value *val;
int lowbound = current_language->string_lower_bound;
struct type *rangetype = create_range_type ((struct type *) NULL,
- builtin_type_int,
+ builtin_type_int32,
lowbound,
len + lowbound - 1);
struct type *stringtype
{
struct value *val;
struct type *domain_type = create_range_type (NULL,
- builtin_type_int,
+ builtin_type_int32,
0, len - 1);
struct type *type = create_set_type ((struct type *) NULL,
domain_type);
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
struct type *range_type
- = create_range_type ((struct type *) NULL, builtin_type_int,
+ = create_range_type ((struct type *) NULL, builtin_type_int32,
low_bound, count + low_bound - 1);
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
struct type *stringtype;
rangetype = create_range_type ((struct type *) NULL,
- builtin_type_int,
+ builtin_type_int32,
lowbound, len + lowbound - 1);
string_char_type = language_string_char_type (current_language,
current_gdbarch);
{
int real_index = index + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type));
struct value *indval =
- value_from_longest (builtin_type_int, (LONGEST) real_index);
+ value_from_longest (builtin_type_int32, (LONGEST) real_index);
gdb_value_subscript (value, indval, cvalue);
}