gdb: remove TYPE_FIELD macro
Replace all uses of it by type::field. Note that since type::field returns a reference to the field, some spots are used to assign the whole field structure. See ctfread.c, function attach_fields_to_type, for example. This is the same as was happening with the macro, so I don't think it's a problem, but if anybody sees a really nicer way to do this, now could be a good time to implement it. gdb/ChangeLog: * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with type::field.
This commit is contained in:
parent
26f1625454
commit
ceacbf6edf
31 changed files with 84 additions and 81 deletions
|
@ -558,7 +558,7 @@ amd64_has_unaligned_fields (struct type *type)
|
|||
/* 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))
|
||||
|
@ -600,7 +600,7 @@ amd64_classify_aggregate_field (struct type *type, int i,
|
|||
|
||||
/* 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue