[Bug c++/25054] GDB passes incorrect values for call-by-value parameters when infcall'ing C++ functions

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Fri Dec 20 16:47:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25054

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tankut Baris Aktemur
<aktemur@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=099a6354dab7e74c990501929f383394fc8efd02

commit 099a6354dab7e74c990501929f383394fc8efd02
Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Date:   Fri Dec 20 17:43:06 2019 +0100

    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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list