aboutsummaryrefslogtreecommitdiff
path: root/gdb/nds32-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/nds32-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/nds32-tdep.c')
-rw-r--r--gdb/nds32-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index d4d07c0..d403b71 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -1405,7 +1405,7 @@ nds32_check_calling_use_fpr (struct type *type)
typecode = t->code ();
if (typecode != TYPE_CODE_STRUCT)
break;
- else if (TYPE_NFIELDS (t) != 1)
+ else if (t->num_fields () != 1)
return 0;
else
t = TYPE_FIELD_TYPE (t, 0);
@@ -1496,7 +1496,7 @@ nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
and pushes all unnamed arguments in stack. */
if (abi_use_fpr && TYPE_VARARGS (func_type)
- && i >= TYPE_NFIELDS (func_type))
+ && i >= func_type->num_fields ())
goto use_stack;
/* Try to use FPRs to pass arguments only when