diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-07-12 22:58:52 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-07-12 22:58:52 -0400 |
commit | 39498edbc850409c332dd5be60a82d1bf704bc8f (patch) | |
tree | a02e5fa6f5e7e742aad3da678648b80be17a22f3 /gdb/valarith.c | |
parent | 3b606f384df54adb8e70dd678cd9a4c9759e4122 (diff) | |
download | gdb-39498edbc850409c332dd5be60a82d1bf704bc8f.zip gdb-39498edbc850409c332dd5be60a82d1bf704bc8f.tar.gz gdb-39498edbc850409c332dd5be60a82d1bf704bc8f.tar.bz2 |
gdb: remove TYPE_ARRAY_{UPPER,LOWER}_BOUND_IS_UNDEFINED
Remove the macros, use the various equivalent getters instead.
gdb/ChangeLog:
* gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
callers to use the equivalent accessor methods instead.
Change-Id: Ifb4c36f440b82533bde5d15a5cbb2fc91f467292
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index a5779a3..0b1f43f 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -200,12 +200,13 @@ value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound } LONGEST elt_offs = elt_size * (index - lowerbound); + bool array_upper_bound_undefined + = array_type->index_type ()->bounds ()->high.kind () == PROP_UNDEFINED; if (index < lowerbound - || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) - && elt_offs >= type_length_units (array_type)) - || (VALUE_LVAL (array) != lval_memory - && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type))) + || (!array_upper_bound_undefined + && elt_offs >= type_length_units (array_type)) + || (VALUE_LVAL (array) != lval_memory && array_upper_bound_undefined)) { if (type_not_associated (array_type)) error (_("no such vector element (vector not associated)")); |