gdb: add type::fields / type::set_fields
Add the `fields` and `set_fields` methods on `struct type`, in order to remove the `TYPE_FIELDS` macro. In this patch, the `TYPE_FIELDS` macro is changed to the `type::fields`, so all the call sites that use it to set the fields array are changed to use `type::set_fields`. The next patch will remove `TYPE_FIELDS` entirely. gdb/ChangeLog: * gdbtypes.h (struct type) <fields, set_fields>: New methods. (TYPE_FIELDS): Use type::fields. Change all call sites that modify the propery to use type::set_fields instead. Change-Id: I05174ce68f2ce3fccdf5d8b469ff141f14886b33
This commit is contained in:
parent
1f704f761b
commit
3cabb6b069
14 changed files with 114 additions and 86 deletions
|
@ -985,8 +985,8 @@ rust_composite_type (struct type *original,
|
|||
result->set_name (name);
|
||||
|
||||
result->set_num_fields (nfields);
|
||||
TYPE_FIELDS (result)
|
||||
= (struct field *) TYPE_ZALLOC (result, nfields * sizeof (struct field));
|
||||
result->set_fields
|
||||
((struct field *) TYPE_ZALLOC (result, nfields * sizeof (struct field)));
|
||||
|
||||
i = 0;
|
||||
bitpos = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue