diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 71827ae..9544758 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1981,9 +1981,9 @@ ada_type_of_array (struct value *arr, int bounds) struct value *high = desc_one_bound (descriptor, arity, 1); arity -= 1; - create_range_type (range_type, value_type (low), - longest_to_int (value_as_long (low)), - longest_to_int (value_as_long (high))); + create_static_range_type (range_type, value_type (low), + longest_to_int (value_as_long (low)), + longest_to_int (value_as_long (high))); elt_type = create_array_type (array_type, elt_type, range_type); if (ada_is_unconstrained_packed_array_type (value_type (arr))) @@ -2754,9 +2754,10 @@ ada_value_slice_from_ptr (struct value *array_ptr, struct type *type, CORE_ADDR base = value_as_address (array_ptr) + ((low - ada_discrete_type_low_bound (TYPE_INDEX_TYPE (type0))) * TYPE_LENGTH (TYPE_TARGET_TYPE (type0))); - struct type *index_type = - create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (type0)), - low, high); + struct type *index_type + = create_static_range_type (NULL, + TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (type0)), + low, high); struct type *slice_type = create_array_type (NULL, TYPE_TARGET_TYPE (type0), index_type); @@ -2768,8 +2769,8 @@ static struct value * ada_value_slice (struct value *array, int low, int high) { struct type *type = ada_check_typedef (value_type (array)); - struct type *index_type = - create_range_type (NULL, TYPE_INDEX_TYPE (type), low, high); + struct type *index_type + = create_static_range_type (NULL, TYPE_INDEX_TYPE (type), low, high); struct type *slice_type = create_array_type (NULL, TYPE_TARGET_TYPE (type), index_type); @@ -2980,9 +2981,9 @@ static struct value * empty_array (struct type *arr_type, int low) { struct type *arr_type0 = ada_check_typedef (arr_type); - struct type *index_type = - create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type0)), - low, low - 1); + struct type *index_type + = create_static_range_type + (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type0)), low, low - 1); struct type *elt_type = ada_array_element_type (arr_type0, 1); return allocate_value (create_array_type (NULL, elt_type, index_type)); @@ -11120,9 +11121,8 @@ to_fixed_range_type (struct type *raw_type, struct value *dval) if (L < INT_MIN || U > INT_MAX) return raw_type; else - return create_range_type (alloc_type_copy (raw_type), raw_type, - ada_discrete_type_low_bound (raw_type), - ada_discrete_type_high_bound (raw_type)); + return create_static_range_type (alloc_type_copy (raw_type), raw_type, + L, U); } else { @@ -11185,7 +11185,8 @@ to_fixed_range_type (struct type *raw_type, struct value *dval) } } - type = create_range_type (alloc_type_copy (raw_type), base_type, L, U); + type = create_static_range_type (alloc_type_copy (raw_type), + base_type, L, U); TYPE_NAME (type) = name; return type; } |