From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101174 invoked by alias); 17 Mar 2017 17:06: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 101152 invoked by uid 89); 17 Mar 2017 17:06:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=D*t, Completion 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; Fri, 17 Mar 2017 17:06:35 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8AACC4E33E; Fri, 17 Mar 2017 17:06:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8AACC4E33E Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=keiths@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8AACC4E33E Received: from valrhona.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FDB751DF9; Fri, 17 Mar 2017 17:06:36 +0000 (UTC) From: Keith Seitz Subject: Re: [PATCH v6 11/11] Add rvalue reference tests and NEWS entry To: Eli Zaretskii References: <1489176286-27973-1-git-send-email-keiths@redhat.com> <1489176286-27973-12-git-send-email-keiths@redhat.com> <83lgsceqoj.fsf@gnu.org> Cc: gdb-patches@sourceware.org Message-ID: <58CC179A.5000807@redhat.com> Date: Fri, 17 Mar 2017 17:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <83lgsceqoj.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00323.txt.bz2 Pedro asked me to resend/ping this since we'd like to have this for 8.0, and my last response had the patch oddly quoted. I apologize for that. Keith On 03/10/2017 02:02 PM, Eli Zaretskii wrote: >> From: Keith Seitz >> Date: Fri, 10 Mar 2017 12:04:46 -0800 >> >> diff --git a/gdb/NEWS b/gdb/NEWS >> index cf58595..edbe41f 100644 >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -7,9 +7,12 @@ >> added by the Memory Protection Keys for Userspace feature which will be >> available in future Intel CPUs. >> >> +* GDB now supports C++11 ravlue references. > ^^^^^^ > A typo. Good catch. Fixed. > (I think it would be nice to have this described in the manual as > well.) I've searched through the manual for a suitable place to mention this, the only bit of doc/gdb.texinfo that talks specifically about C++ references is the "reference declarations" in the C++ Expressions node. I've added a bit explaining that GDB understands both lvalue and rvalue references. Let me know if you would like anything further, and thank you for the quick review! [I've trimmed down the patch to just the documentation parts. If you would like to see the full patch, please see my reply to Pedro's message on this patch.] Keith commit 25826f564b480af57a1da01c0f76c4b61034485e Author: Artemiy Volkov Date: Wed Jan 25 10:33:56 2017 -0800 Add rvalue reference tests and docs This patch adds tests for the initial rvalue reference support patchset. All of the new tests are practically mirrored regular references tests and, except for the demangler ones, are introduced in new files, which are set to be compiled with -std=gnu++11. Tested are printing of rvalue reference types and values, rvalue reference parameters in function overloading, demangling of function names containing rvalue reference parameters, casts to rvalue reference types, application of the sizeof operator to rvalue reference types and values, and support for rvalue references within the gdb python module. gdb/ChnageLog PR gdb/14441 * NEWS: Mention support for rvalue references in GDB and python. * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB supports both lvalue and rvalue references. [snip] diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 544f192..7876b47 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,13 @@ 2017-MM-DD Artemiy Volkov PR gdb/14441 + * NEWS: Mention support for rvalue references in GDB and python. + * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB + supports both lvalue and rvalue references. + +2017-MM-DD Artemiy Volkov + + PR gdb/14441 * gdbtypes.c (rank_one_type): Implement overloading resolution rules regarding rvalue references. diff --git a/gdb/NEWS b/gdb/NEWS index cf58595..4fade30 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -7,9 +7,12 @@ added by the Memory Protection Keys for Userspace feature which will be available in future Intel CPUs. +* GDB now supports C++11 rvalue references. + * Python Scripting ** New functions to start, stop and access a running btrace recording. + ** Rvalue references are now supported in gdb.Type. * GDB now supports recording and replaying rdrand and rdseed Intel 64 instructions. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5cf0f97..581ddae 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -14827,9 +14827,9 @@ see @ref{Completion, ,Command Completion}. @cindex reference declarations @item -@value{GDBN} understands variables declared as C@t{++} references; you can use -them in expressions just as you do in C@t{++} source---they are automatically -dereferenced. +@value{GDBN} understands variables declared as C@t{++} lvalue or rvalue +references; you can use them in expressions just as you do in C@t{++} +source---they are automatically dereferenced.