aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-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/mips-tdep.c
parent3cabb6b0694b65c7b5ed800822ca08bd899fc1d1 (diff)
downloadbinutils-80fc5e77f07557830aaac90723dc599e6d047922.zip
binutils-80fc5e77f07557830aaac90723dc599e6d047922.tar.gz
binutils-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/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index a3ab8c8..c602398 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5247,7 +5247,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function,
: MIPS_V0_REGNUM);
field < type->num_fields (); field++, regnum += 2)
{
- int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
+ int offset = (FIELD_BITPOS (type->field (field))
/ TARGET_CHAR_BIT);
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n",
@@ -5799,7 +5799,7 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function,
for (field = 0, regnum = mips_regnum (gdbarch)->fp0;
field < type->num_fields (); field++, regnum += 2)
{
- int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
+ int offset = (FIELD_BITPOS (type->fields ()[field])
/ TARGET_CHAR_BIT);
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n",