]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
Fix function call regression in new evaluator
authorTom Tromey <tromey@adacore.com>
Tue, 9 Mar 2021 14:36:26 +0000 (07:36 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 9 Mar 2021 14:36:26 +0000 (07:36 -0700)
commitccdc02ed07bbed9468c275a943fc5a970e949e99
treeda564e8abf704100761bc9f9bb28145dd51df327
parent5dc75cf3254c1b3c5b62125f47b543407836a4b6
Fix function call regression in new evaluator

The internal AdaCore test suite revealed a bug in the new evaluator.
A hunk of evaluate_funcall was not correctly transcribed.  This was
not caught in my original testing because the feature in question was
apparently not tested in gdb.

This patch fixes the oversight.  The idea here is that ordinary
function calls should use the function's formal parameter types as the
expected types of subexpressions.

Regression tested on x86-64 Fedora 32.

gdb/ChangeLog
2021-03-09  Tom Tromey  <tromey@adacore.com>

* eval.c (operation::evaluate_funcall): Use function formal
parameter types when evaluating.

gdb/testsuite/ChangeLog
2021-03-09  Tom Tromey  <tromey@adacore.com>

* gdb.base/cast-call.exp: New file.
* gdb.base/cast-call.c: New file.
gdb/ChangeLog
gdb/eval.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/cast-call.c [new file with mode: 0644]
gdb/testsuite/gdb.base/cast-call.exp [new file with mode: 0644]