aboutsummaryrefslogtreecommitdiff
path: root/gdb/iq2000-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-22 16:55:17 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-22 16:55:17 -0400
commit80fc5e77f07557830aaac90723dc599e6d047922 (patch)
tree2630018f94b5bc23fd160e17468acc7c8675c321 /gdb/iq2000-tdep.c
parent3cabb6b0694b65c7b5ed800822ca08bd899fc1d1 (diff)
downloadfsf-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/iq2000-tdep.c')
-rw-r--r--gdb/iq2000-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 18d2075..b35b45e 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -607,7 +607,7 @@ iq2000_pass_8bytetype_by_address (struct type *type)
if (type->num_fields () != 1)
return 1;
/* Get field type. */
- ftype = (TYPE_FIELDS (type))[0].type;
+ ftype = type->field (0).type;
/* The field type must have size 8, otherwise pass by address. */
if (TYPE_LENGTH (ftype) != 8)
return 1;