aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-22 16:55:15 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-22 16:55:15 -0400
commit1f704f761b34e145f5eabdc222301ce6e9ec9102 (patch)
tree89c8b6dbf40b606ef045929b718d9271093057a3 /gdb/sparc64-tdep.c
parent5e33d5f4e1a5f2c3556ee31715ddc030d039b597 (diff)
downloadgdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.zip
gdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.tar.gz
gdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.tar.bz2
gdb: remove TYPE_NFIELDS macro
Remove `TYPE_NFIELDS`, changing all the call sites to use `type::num_fields` directly. This is quite a big diff, but this was mostly done using sed and coccinelle. A few call sites were done by hand. gdb/ChangeLog: * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use type::num_fields instead. Change-Id: Ib73be4c36f9e770e0f729bac3b5257d7cb2f9591
Diffstat (limited to 'gdb/sparc64-tdep.c')
-rw-r--r--gdb/sparc64-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 2529ddc..5d6ef07 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1179,7 +1179,7 @@ sparc64_16_byte_align_p (struct type *type)
{
int i;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
@@ -1256,7 +1256,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type,
{
int i;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
int subpos = bitpos + TYPE_FIELD_BITPOS (type, i);
@@ -1274,7 +1274,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type,
probably in older releases to. To appease GCC, if a
structure has only a single `float' member, we store its
value in %f1 too (we already have stored in %f0). */
- if (TYPE_NFIELDS (type) == 1)
+ if (type->num_fields () == 1)
{
struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, 0));
@@ -1344,7 +1344,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
{
int i;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
int subpos = bitpos + TYPE_FIELD_BITPOS (type, i);