if (type->code () == TYPE_CODE_STRUCT
|| type->code () == TYPE_CODE_UNION)
{
- for (int i = 0; i < TYPE_NFIELDS (type); i++)
+ for (int i = 0; i < type->num_fields (); i++)
{
- struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+ struct type *subtype = check_typedef (type->field (i).type ());
int bitpos = TYPE_FIELD_BITPOS (type, i);
int align = type_align(subtype);
/* Ignore static fields, empty fields (for example nested
empty structures), and bitfields (these are handled by
the caller). */
- if (field_is_static (&TYPE_FIELD (type, i))
+ if (field_is_static (&type->field (i))
|| (TYPE_FIELD_BITSIZE (type, i) == 0
&& TYPE_LENGTH (subtype) == 0)
|| TYPE_FIELD_PACKED (type, i))
enum amd64_reg_class theclass[2],
unsigned int bitoffset)
{
- struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+ struct type *subtype = check_typedef (type->field (i).type ());
int bitpos = bitoffset + TYPE_FIELD_BITPOS (type, i);
int pos = bitpos / 64;
enum amd64_reg_class subclass[2];
/* Ignore static fields, or empty fields, for example nested
empty structures.*/
- if (field_is_static (&TYPE_FIELD (type, i)) || bitsize == 0)
+ if (field_is_static (&type->field (i)) || bitsize == 0)
return;
if (subtype->code () == TYPE_CODE_STRUCT
{
/* Each field of an object is classified recursively. */
int j;
- for (j = 0; j < TYPE_NFIELDS (subtype); j++)
+ for (j = 0; j < subtype->num_fields (); j++)
amd64_classify_aggregate_field (subtype, j, theclass, bitpos);
return;
}
gdb_assert (type->code () == TYPE_CODE_STRUCT
|| type->code () == TYPE_CODE_UNION);
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
amd64_classify_aggregate_field (type, i, theclass, 0);
}