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/infcall.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/infcall.c')
-rw-r--r-- | gdb/infcall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index 8da843a..d211ad8 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -827,7 +827,7 @@ call_function_by_hand_dummy (struct value *function, values_type = check_typedef (values_type); - if (args.size () < TYPE_NFIELDS (ftype)) + if (args.size () < ftype->num_fields ()) error (_("Too few arguments in function call.")); /* A holder for the inferior status. @@ -1027,7 +1027,7 @@ call_function_by_hand_dummy (struct value *function, prototyped. Can we respect TYPE_VARARGS? Probably not. */ if (ftype->code () == TYPE_CODE_METHOD) prototyped = 1; - if (TYPE_TARGET_TYPE (ftype) == NULL && TYPE_NFIELDS (ftype) == 0 + if (TYPE_TARGET_TYPE (ftype) == NULL && ftype->num_fields () == 0 && default_return_type != NULL) { /* Calling a no-debug function with the return type @@ -1042,12 +1042,12 @@ call_function_by_hand_dummy (struct value *function, */ prototyped = 1; } - else if (i < TYPE_NFIELDS (ftype)) + else if (i < ftype->num_fields ()) prototyped = TYPE_PROTOTYPED (ftype); else prototyped = 0; - if (i < TYPE_NFIELDS (ftype)) + if (i < ftype->num_fields ()) param_type = TYPE_FIELD_TYPE (ftype, i); else param_type = NULL; |