diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:17 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:17 -0400 |
commit | 80fc5e77f07557830aaac90723dc599e6d047922 (patch) | |
tree | 2630018f94b5bc23fd160e17468acc7c8675c321 /gdb/stabsread.c | |
parent | 3cabb6b0694b65c7b5ed800822ca08bd899fc1d1 (diff) | |
download | fsf-binutils-gdb-80fc5e77f07557830aaac90723dc599e6d047922.zip fsf-binutils-gdb-80fc5e77f07557830aaac90723dc599e6d047922.tar.gz fsf-binutils-gdb-80fc5e77f07557830aaac90723dc599e6d047922.tar.bz2 |
gdb: remove TYPE_FIELDS macro
Remove all uses of the `TYPE_FIELDS` macro. Replace them with either:
1) type::fields, to obtain a pointer to the fields array (same as
TYPE_FIELDS yields)
2) type::field, a new convenience method that obtains a reference to one
of the type's field by index. It is meant to replace
TYPE_FIELDS (type)[idx]
with
type->field (idx)
gdb/ChangeLog:
* gdbtypes.h (struct type) <field>: New method.
(TYPE_FIELDS): Remove, replace all uses with either type::fields
or type::field.
Change-Id: I49fba10114417deb502060c6156aa5f7fc62462f
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index e710a43..8d53529 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1840,7 +1840,7 @@ again: func_type->set_fields ((struct field *) TYPE_ALLOC (func_type, num_args * sizeof (struct field))); - memset (TYPE_FIELDS (func_type), 0, num_args * sizeof (struct field)); + memset (func_type->fields (), 0, num_args * sizeof (struct field)); { int i; struct type_list *t; @@ -3313,7 +3313,7 @@ attach_fields_to_type (struct stab_field_info *fip, struct type *type, type->set_fields ((struct field *) TYPE_ALLOC (type, sizeof (struct field) * nfields)); - memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + memset (type->fields (), 0, sizeof (struct field) * nfields); if (non_public_fields) { @@ -3660,7 +3660,7 @@ read_enum_type (const char **pp, struct type *type, type->set_fields ((struct field *) TYPE_ALLOC (type, sizeof (struct field) * nsyms)); - memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nsyms); + memset (type->fields (), 0, sizeof (struct field) * nsyms); /* Find the symbols for the values and put them into the type. The symbols can be found in the symlist that we put them on |