From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13650 invoked by alias); 12 Nov 2019 15:22:39 -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 13635 invoked by uid 89); 12 Nov 2019 15:22:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=sk:tankut, aktemur, sk:tankut., baris 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; Tue, 12 Nov 2019 15:22:37 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 2E831203AC; Tue, 12 Nov 2019 10:22:35 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 06D5820322; Tue, 12 Nov 2019 10:22:33 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 89C6320AF6; Tue, 12 Nov 2019 10:22:33 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Tue, 12 Nov 2019 15:22:00 -0000 From: "Tankut Baris Aktemur (Code Review)" To: gdb-patches@sourceware.org Cc: Tom Tromey , Andrew Burgess Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review] infcall, c++: collect more pass-by-reference information X-Gerrit-Change-Id: Ic05bd98a962d07ec3c1ad041f709687eabda3bb9 X-Gerrit-Change-Number: 137 X-Gerrit-ChangeURL: X-Gerrit-Commit: 3a1fe43a7b47d749f3bcef98d58983cc9cd26675 In-Reply-To: References: X-Gerrit-Comment-Date: Tue, 12 Nov 2019 10:22:30 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191112152233.89C6320AF6@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00321.txt.bz2 Tankut Baris Aktemur has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/137 ...................................................................... Patch Set 1: (1 comment) | --- gdb/gnu-v3-abi.c | +++ gdb/gnu-v3-abi.c | @@ -1272,9 +1409,14 @@ gnuv3_pass_by_reference (struct type *type) | See c++98 section 12.8 Copying class objects [class.copy]. */ | if (gnuv3_dynamic_class (type)) | - { | - info.trivially_copyable = false; | - return info; | - } | - | + is_dynamic = true; | + | + /* FIXME taktemur/2019-04-23: What if there are multiple copy ctors? PS1, Line 1413: Thanks for the suggestion. I think overload resolution will work. It will thus increase the coverage of this series, and also simplify the definition of the `language_pass_by_ref_info` struct. There is one problem, though. GDB picks the move constructor as a result of overload resolution, instead of the copy constructor. I detected that there is a bug in GDB's ranking mechanism. I'll propose a patch to fix it. For the moment I'm keeping this series on hold. | + E.g.: | + class C { | + public: | + C (C &c) { ... } | + C (const C &c) { ... } | + }; | + */ | for (fieldnum = 0; fieldnum < TYPE_NFN_FIELDS (type); fieldnum++) | for (fieldelem = 0; fieldelem < TYPE_FN_FIELDLIST_LENGTH (type, fieldnum); -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Ic05bd98a962d07ec3c1ad041f709687eabda3bb9 Gerrit-Change-Number: 137 Gerrit-PatchSet: 1 Gerrit-Owner: Tankut Baris Aktemur Gerrit-Reviewer: Andrew Burgess Gerrit-Reviewer: Tankut Baris Aktemur Gerrit-Reviewer: Tom Tromey Gerrit-Comment-Date: Tue, 12 Nov 2019 15:22:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Tom Tromey Gerrit-MessageType: comment