diff options
author | Sanimir Agovic <sanimir.agovic@intel.com> | 2013-12-19 08:31:17 +0000 |
---|---|---|
committer | Sanimir Agovic <sanimir.agovic@intel.com> | 2014-04-11 13:43:45 +0100 |
commit | 0c9c3474029f5250b428274eaf63f7a349c6fc5f (patch) | |
tree | 80a0b657db1ffc45df9c13b9f42ca196e389e8aa /gdb/ada-lang.c | |
parent | 85cf705b9d4c2082e5c4a41126bf773ff435d3d2 (diff) | |
download | gdb-0c9c3474029f5250b428274eaf63f7a349c6fc5f.zip gdb-0c9c3474029f5250b428274eaf63f7a349c6fc5f.tar.gz gdb-0c9c3474029f5250b428274eaf63f7a349c6fc5f.tar.bz2 |
refactoring: rename create_range_type to create_static_range_type
* gdbtypes.c (create_static_range_type): Renamed from create_range_type.
* gdbtypes.h (create_static_range_type): Renamed from create_range_type.
* ada-lang.c: All uses of create_range_type updated.
* coffread.c: All uses of create_range_type updated.
* dwarf2read.c: All uses of create_range_type updated.
* f-exp.y: All uses of create_range_type updated.
* m2-valprint.c: All uses of create_range_type updated.
* mdebugread.c: All uses of create_range_type updated.
* stabsread.c: All uses of create_range_type updated.
* valops.c: All uses of create_range_type updated.
* valprint.c: All uses of create_range_type updated.
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; } |