Clean up arguments to evaluate_subexp_do_call
I noticed hat evaluate_subexp_do_call takes an array of arguments and a count -- but, unlike the usual convention, the count does not include the first element. This patch changes this function to match call_function_by_hand -- passing the callee separately, and using an array_view for the arguments. This makes it simpler to understand. Regression tested on x86-64 Fedora 28. gdb/ChangeLog 2020-12-15 Tom Tromey <tom@tromey.com> * f-lang.c (evaluate_subexp_f): Update. * expression.h (evaluate_subexp_do_call): Update. * eval.c (evaluate_subexp_do_call): Add callee parameter. Replace nargs, argvec with array_view. (evaluate_funcall): Update.
This commit is contained in:
parent
cf608cc40c
commit
1ab8280d7d
4 changed files with 28 additions and 19 deletions
|
@ -947,8 +947,10 @@ evaluate_subexp_f (struct type *expect_type, struct expression *exp,
|
|||
argvec[tem] = 0; /* signal end of arglist */
|
||||
if (noside == EVAL_SKIP)
|
||||
return eval_skip_value (exp);
|
||||
return evaluate_subexp_do_call (exp, noside, nargs, argvec, NULL,
|
||||
expect_type);
|
||||
return evaluate_subexp_do_call (exp, noside, argvec[0],
|
||||
gdb::make_array_view (argvec + 1,
|
||||
nargs),
|
||||
NULL, expect_type);
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue