From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39015 invoked by alias); 9 Dec 2019 17:45:53 -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 38949 invoked by uid 89); 9 Dec 2019 17:45:52 -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= 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; Mon, 09 Dec 2019 17:45:50 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 29D2620489; Mon, 9 Dec 2019 12:45:47 -0500 (EST) 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 25D7220422; Mon, 9 Dec 2019 12:45:41 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 1765728177; Mon, 9 Dec 2019 12:45:41 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Mon, 09 Dec 2019 17:45:00 -0000 From: "Tankut Baris Aktemur (Code Review)" To: gdb-patches@sourceware.org Cc: Tom Tromey Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [review v2] 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: 3226beeefbfa7ccdf6067a34d185decf6513b52c In-Reply-To: References: Reply-To: tankut.baris.aktemur@intel.com, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191209174541.1765728177@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-12/txt/msg00348.txt.bz2 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 - classes with multiple copy and/or move ctors 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 each time the test is executed. 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, 8.2.0, and 9.2.1. gdb/testsuite/ChangeLog: 2019-11-07 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,173 insertions(+), 69 deletions(-) -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Ie8ab1f260c6ad5ee4eb34b2c1597ce24af04abb6 Gerrit-Change-Number: 142 Gerrit-PatchSet: 2 Gerrit-Owner: Tankut Baris Aktemur Gerrit-Reviewer: Tankut Baris Aktemur Gerrit-CC: Tom Tromey Gerrit-MessageType: newpatchset