From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14676 invoked by alias); 14 Oct 2013 16:10:26 -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 14665 invoked by uid 89); 14 Oct 2013 16:10:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Oct 2013 16:10:25 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9EGAMYI016635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Oct 2013 12:10:22 -0400 Received: from barimba (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9EGAK52028739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 14 Oct 2013 12:10:21 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Jonathan Wakely Subject: Re: [patch] Support C++11 rvalue (move constructor) References: <20131012152836.GA9438@host2.jankratochvil.net> Date: Mon, 14 Oct 2013 16:10:00 -0000 In-Reply-To: <20131012152836.GA9438@host2.jankratochvil.net> (Jan Kratochvil's message of "Sat, 12 Oct 2013 17:28:36 +0200") Message-ID: <87fvs33kb7.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-10/txt/msg00439.txt.bz2 CCing Jonathan Wakely. Jan> currently one cannot debug C++11 move constructors, one gets: This is PR 14441. Also see the thread: https://sourceware.org/ml/gdb/2012-10/msg00108.html I think Jonathan started a branch for this... Jan> Therefore there is a KFAIL in the testcase for it. I do not think Jan> GDB needs to handle && differently - except for displaying && Jan> instead of &. Is that also true for inferior calls? I didn't look. Jan> or to add new main_type::flag_ref_is_rvalue valid only for Jan> TYPE_CODE_REF but that is sure not a clean implementation. If the semantics of the two kinds of references are sufficiently similar, then I don't think it is actually so bad. Jan> (2) One would need to add type.rvalue_reference_type (besides Jan> type.reference_type) to prevent leaks of types. This would mean Jan> increasing the current sizeof (struct type) 40 -> 48. The proper Jan> solution is to rather implement reference counting or garbage Jan> collecting of types and merge struct type into struct main_type. Maybe the size increase isn't that important. Alternatively maybe it can be handled like qualifiers. Jan> Anyway currently I find the patch below as a good enough hack as currently Jan> I find it a bit blocker when using C++11. It seems reasonable to me -- an improvement, and not blocking any future improvements. Tom