Remove it and update all callers to use the equivalent accessor methods.
A subsequent patch will make type::bit_stride work for array types
(effectively replacing this macro), but I wanted to keep this patch a
simple mechanical change.
gdb/ChangeLog:
* gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
callers to use the equivalent accessor methods.
Change-Id: I09e14bd45075f98567adce8a0b93edea7722f812
+2020-07-12 Simon Marchi <simon.marchi@efficios.com>
+
+ * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
+ callers to use the equivalent accessor methods.
+
2020-07-12 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (struct range_bounds) <bit_stride>: New method.
struct gdbarch *gdbarch = get_type_arch (type);
size_t dim_size = type_length_units (TYPE_TARGET_TYPE (type));
int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
- size_t byte_stride = TYPE_ARRAY_BIT_STRIDE (type) / (unit_size * 8);
+ size_t byte_stride
+ = type->index_type ()->bounds ()->bit_stride () / (unit_size * 8);
if (byte_stride == 0)
byte_stride = dim_size;
size_t offs = 0;
#define TYPE_DYN_PROP_KIND(dynprop) \
(dynprop->kind ())
-
-/* Accessors for struct range_bounds data attached to an array type's
- index type. */
-
-#define TYPE_ARRAY_BIT_STRIDE(arraytype) \
- ((arraytype)->index_type ()->bounds ()->bit_stride ())
-
/* C++ */
#define TYPE_SELF_TYPE(thistype) internal_type_self_type (thistype)
/* Fetch the bit stride and convert it to a byte stride, assuming 8 bits
in a byte. */
- LONGEST stride = TYPE_ARRAY_BIT_STRIDE (array_type);
+ LONGEST stride = array_type->index_type ()->bounds ()->bit_stride ();
if (stride != 0)
{
struct gdbarch *arch = get_type_arch (elt_type);