diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:15 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:15 -0400 |
commit | 1f704f761b34e145f5eabdc222301ce6e9ec9102 (patch) | |
tree | 89c8b6dbf40b606ef045929b718d9271093057a3 /gdb/s390-tdep.c | |
parent | 5e33d5f4e1a5f2c3556ee31715ddc030d039b597 (diff) | |
download | gdb-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/s390-tdep.c')
-rw-r--r-- | gdb/s390-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index e94bf59..d6f176a 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1644,7 +1644,7 @@ s390_effective_inner_type (struct type *type, unsigned int min_size) /* Find a non-static field, if any. Unless there's exactly one, abort the unwrapping. */ - for (int i = 0; i < TYPE_NFIELDS (type); i++) + for (int i = 0; i < type->num_fields (); i++) { struct field f = TYPE_FIELD (type, i); @@ -1938,7 +1938,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function, and arg_state.argp with the size of the parameter area. */ for (i = 0; i < nargs; i++) s390_handle_arg (&arg_state, args[i], tdep, word_size, byte_order, - TYPE_VARARGS (ftype) && i >= TYPE_NFIELDS (ftype)); + TYPE_VARARGS (ftype) && i >= ftype->num_fields ()); param_area_start = align_down (arg_state.copy - arg_state.argp, 8); @@ -1965,7 +1965,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* Write all parameters. */ for (i = 0; i < nargs; i++) s390_handle_arg (&arg_state, args[i], tdep, word_size, byte_order, - TYPE_VARARGS (ftype) && i >= TYPE_NFIELDS (ftype)); + TYPE_VARARGS (ftype) && i >= ftype->num_fields ()); /* Store return PSWA. In 31-bit mode, keep addressing mode bit. */ if (word_size == 4) |