From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109585 invoked by alias); 18 Oct 2019 13:53:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 109512 invoked by uid 89); 18 Oct 2019 13:53:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2222 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 13:53:36 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 434C0205E7; Fri, 18 Oct 2019 09:53:31 -0400 (EDT) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id AB96F20968 for ; Fri, 18 Oct 2019 09:53:24 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 9770321926 for ; Fri, 18 Oct 2019 09:53:24 -0400 (EDT) X-Gerrit-PatchSet: 1 Date: Fri, 18 Oct 2019 13:53:00 -0000 From: "Tankut Baris Aktemur (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] testsuite, cp: increase the coverage of testing pass-by-ref arguments X-Gerrit-Change-Id: Ie8ab1f260c6ad5ee4eb34b2c1597ce24af04abb6 X-Gerrit-Change-Number: 142 X-Gerrit-ChangeURL: X-Gerrit-Commit: d677f42a7bb2d3ed6eee7678e01b2e69ff954939 References: Reply-To: tankut.baris.aktemur@intel.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3 Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2019-10/txt/msg00630.txt.bz2 Tankut Baris Aktemur has uploaded a new change for review. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/142 ...................................................................... testsuite, cp: increase the coverage of testing pass-by-ref arguments Extend testcases for GDB's infcall of call-by-value functions that take aggregate values as parameters. In particular, existing test has been substantially extended with class definitions whose definitions of copy constructor, destructor, and move constructor functions are a combination of (1) explicitly defined by the user, (2) defaulted inside the class declaration, (3) defaulted outside the class declaration, (4) deleted (5) not defined in the source. For each combination, a small and a large class is generated as well as a derived class and a container class. Additionally, the following manually-written cases are provided: - a dynamic class (i.e. class with a virtual method) - classes that contain an array field - a class whose copy ctor is inlined - a class whose destructor is deleted Test cases check whether GDB makes the right decision to pass an object by value or implicitly by reference, whether really a copy of the argument is passed, and whether the copy constructor and destructor of the clone of the argument are invoked properly. The input program pass-by-ref.cc is generated. By means of a flag inside the test file, the program can be re-generated. The input program pass-by-ref-2.cc is manually-written. Tests have been verified on the X86_64 architecture with GCC 7.4.0 and 8.2.0. gdb/testsuite/ChangeLog: 2019-MM-DD Tankut Baris Aktemur * gdb.cp/pass-by-ref.cc: Extend with more cases (generated). * gdb.cp/pass-by-ref.exp: Extend with more cases. * gdb.cp/pass-by-ref-2.cc: New file. * gdb.cp/pass-by-ref-2.exp: New file. Change-Id: Ie8ab1f260c6ad5ee4eb34b2c1597ce24af04abb6 --- A gdb/testsuite/gdb.cp/pass-by-ref-2.cc A gdb/testsuite/gdb.cp/pass-by-ref-2.exp M gdb/testsuite/gdb.cp/pass-by-ref.cc M gdb/testsuite/gdb.cp/pass-by-ref.exp 4 files changed, 8,015 insertions(+), 45 deletions(-)