public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] testsuite, cp: increase the coverage of testing pass-by-ref arguments
@ 2019-10-18 13:53 Tankut Baris Aktemur (Code Review)
  2019-10-28 22:06 ` Tom Tromey (Code Review)
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Tankut Baris Aktemur (Code Review) @ 2019-10-18 13:53 UTC (permalink / raw)
  To: gdb-patches

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  <tankut.baris.aktemur@intel.com>

	* 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(-)




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-01-29 10:54 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 13:53 [review] testsuite, cp: increase the coverage of testing pass-by-ref arguments Tankut Baris Aktemur (Code Review)
2019-10-28 22:06 ` Tom Tromey (Code Review)
2019-10-31 13:19 ` Tankut Baris Aktemur (Code Review)
2019-11-01 15:18   ` Tom Tromey
2019-11-08  8:08     ` Aktemur, Tankut Baris
2019-12-09 17:45 ` [review v2] " Tankut Baris Aktemur (Code Review)
2019-12-09 17:56 ` Tankut Baris Aktemur (Code Review)
2019-12-13 21:38 ` Tom Tromey (Code Review)
2019-12-14  9:53 ` [review v3] " Tankut Baris Aktemur (Code Review)
2020-01-13 18:58   ` Luis Machado
2020-01-13 19:38     ` Aktemur, Tankut Baris
2020-01-13 19:40       ` Luis Machado
2020-01-13 20:21         ` Aktemur, Tankut Baris
2020-01-14 13:13           ` Aktemur, Tankut Baris
2020-01-14 13:31             ` Luis Machado
2020-01-15 14:41               ` Aktemur, Tankut Baris
2020-01-28 12:30                 ` Aktemur, Tankut Baris
2020-01-29  3:18                   ` Simon Marchi
2020-01-29 10:54                     ` Aktemur, Tankut Baris
2020-01-29 11:08                     ` Aktemur, Tankut Baris
2019-12-14  9:56 ` Tankut Baris Aktemur (Code Review)
2019-12-20  7:29 ` Tankut Baris Aktemur (Code Review)
2019-12-20 15:54 ` Tom Tromey (Code Review)
2019-12-20 16:47 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-20 16:47 ` Sourceware to Gerrit sync (Code Review)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).