infcall: handle pass-by-reference arguments appropriately
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Fri, 20 Dec 2019 16:43:06 +0000 (17:43 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Fri, 20 Dec 2019 16:43:06 +0000 (17:43 +0100)
commit099a6354dab7e74c990501929f383394fc8efd02
treea9a1bbfc10c14ff65af9b6d9e8cdf6106a07e197
parent62bf63d74d54482d42e9d78890ebc0dd4675e23b
infcall: handle pass-by-reference arguments appropriately

If an aggregate argument is implicitly pass-by-reference, allocate a
temporary object on the stack, initialize it via the copy constructor
(if exists) or trivially by memcpy'ing.  Pass the reference of the
temporary to the callee function.  After the callee returns, invoke
the destructor of the temporary.

gdb/ChangeLog:
2019-12-20  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

PR gdb/25054
* infcall.c (call_function_by_hand_dummy): Update the argument-
passing section for call-by-value parameters.
(struct destructor_info): New struct.
(call_destructors): New auxiliary function.

Change-Id: I18fa5d0df814dfa0defe9e862a88a6dbf1d99d01
gdb/ChangeLog
gdb/infcall.c
This page took 0.025638 seconds and 4 git commands to generate.