From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128274 invoked by alias); 28 Dec 2015 21:09:01 -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 128257 invoked by uid 89); 28 Dec 2015 21:09:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=propagating, UD:symtab.c, symtabc, symtab.c X-HELO: mail-lf0-f52.google.com Received: from mail-lf0-f52.google.com (HELO mail-lf0-f52.google.com) (209.85.215.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 28 Dec 2015 21:08:58 +0000 Received: by mail-lf0-f52.google.com with SMTP id z124so198900975lfa.3 for ; Mon, 28 Dec 2015 13:08:58 -0800 (PST) X-Received: by 10.25.162.65 with SMTP id l62mr20125183lfe.64.1451336935368; Mon, 28 Dec 2015 13:08:55 -0800 (PST) Received: from gmail.com ([37.204.1.155]) by smtp.gmail.com with ESMTPSA id y15sm10903219lfd.3.2015.12.28.13.08.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Dec 2015 13:08:54 -0800 (PST) Date: Mon, 28 Dec 2015 21:09:00 -0000 From: Artemiy Volkov To: gdb-patches@sourceware.org Subject: Re: [PATCH 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Message-ID: <20151229000501.GA27755@gmail.com> References: <1450661481-31178-1-git-send-email-artemiyv@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450661481-31178-1-git-send-email-artemiyv@acm.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00523.txt.bz2 On Mon, Dec 21, 2015 at 04:31:10AM +0300, Artemiy Volkov wrote: > Hi all, > > this is my take on fixing gdb/14441 which deals with C++0x rvalue references. > > The approach is rather straightforward and the work for the most part consisted > of mimicking the behavior for regular references. In gdbtypes.c, several helper > functions were introduced and some parameterized by the reference kind to > simplify the access to reference type objects API. > > The only interesting part is the addition of overloading resolution rules > with regard to rvalue references. All of the cases introduced in 13.3.3.1.4 and > 13.3.3.2 were accounted for at the beginning of rank_one_type(). > > With this patch it is now also possible to fix the evaluation of decltype, > which should return a plain type object, an lvalue reference or an rvalue > reference depending on a type category of the type of its operand. However, > this would require introduction of the type catyegory notion to gdb, which I > think only needs adding a new constant to lval_type and propagating the type > category through different parts of an expression in gdb/valops.c. I'm willing > to do this if this patchset turns out to be OK. Ping? Any comments on this patchset? > > Artemiy Volkov (11): > gdb: gdbtypes: add definitions for rvalue reference type > gdb: gdbtypes: change {lookup,make}_reference_type() API > gdb: valops: add ability to return rvalue reference values from > value_ref() > gdb: parse: support rvalue reference type > gdb: demangle: implement demangling for rvalue reference typenames > gdb: print: implement correct printing of rvalue reference types and > values > gdb: dwarf2read: support DW_AT_rvalue_reference type > gdb: convert lvalue reference type check to general reference type > check > gdb: gdbtypes: add rvalue references to overloading resolution > gdb: python: support rvalue references in the gdb module > gdb: testsuite: add rvalue reference tests > > gdb/aarch64-tdep.c | 5 +- > gdb/ada-lang.c | 2 +- > gdb/amd64-tdep.c | 2 +- > gdb/amd64-windows-tdep.c | 1 + > gdb/arm-tdep.c | 5 +- > gdb/ax-gdb.c | 2 + > gdb/c-exp.y | 6 +- > gdb/c-typeprint.c | 10 +- > gdb/c-valprint.c | 13 ++- > gdb/c-varobj.c | 10 +- > gdb/compile/compile-c-symbols.c | 2 +- > gdb/completer.c | 3 +- > gdb/cp-name-parser.y | 4 + > gdb/cp-support.c | 3 +- > gdb/darwin-nat-info.c | 2 +- > gdb/dwarf2loc.c | 4 +- > gdb/dwarf2read.c | 15 ++- > gdb/eval.c | 16 ++-- > gdb/f-exp.y | 2 +- > gdb/findvar.c | 6 +- > gdb/gdbtypes.c | 96 ++++++++++++++++--- > gdb/gdbtypes.h | 21 ++++- > gdb/guile/scm-type.c | 2 +- > gdb/guile/scm-value.c | 2 +- > gdb/hppa-tdep.c | 1 + > gdb/infcall.c | 5 +- > gdb/language.c | 3 +- > gdb/m32c-tdep.c | 8 +- > gdb/m88k-tdep.c | 1 + > gdb/mn10300-tdep.c | 1 + > gdb/msp430-tdep.c | 2 +- > gdb/parse.c | 41 ++++---- > gdb/parser-defs.h | 1 + > gdb/ppc-sysv-tdep.c | 10 +- > gdb/printcmd.c | 4 +- > gdb/python/lib/gdb/command/explore.py | 21 +++++ > gdb/python/lib/gdb/types.py | 4 +- > gdb/python/py-type.c | 14 ++- > gdb/python/py-value.c | 45 +++++++-- > gdb/python/py-xmethods.c | 19 +++- > gdb/s390-linux-tdep.c | 2 +- > gdb/sparc-tdep.c | 1 + > gdb/sparc64-tdep.c | 1 + > gdb/spu-tdep.c | 1 + > gdb/stabsread.c | 2 +- > gdb/symtab.c | 3 +- > gdb/testsuite/gdb.cp/casts.cc | 8 +- > gdb/testsuite/gdb.cp/casts.exp | 34 ++++++- > gdb/testsuite/gdb.cp/cpsizeof.cc | 4 + > gdb/testsuite/gdb.cp/cpsizeof.exp | 2 +- > gdb/testsuite/gdb.cp/demangle.exp | 172 +++++++++++++++++++++++++++++++++- > gdb/testsuite/gdb.cp/overload.cc | 9 ++ > gdb/testsuite/gdb.cp/overload.exp | 14 ++- > gdb/testsuite/gdb.cp/ref-params.cc | 29 +++++- > gdb/testsuite/gdb.cp/ref-params.exp | 20 +++- > gdb/testsuite/gdb.cp/ref-types.cc | 24 +++++ > gdb/testsuite/gdb.cp/ref-types.exp | 136 ++++++++++++++++++++++++++- > gdb/typeprint.c | 4 +- > gdb/valarith.c | 6 +- > gdb/valops.c | 68 +++++++------- > gdb/valprint.c | 5 +- > gdb/value.c | 12 ++- > gdb/value.h | 2 +- > gdb/varobj.c | 2 +- > libiberty/cplus-dem.c | 14 ++- > 65 files changed, 805 insertions(+), 184 deletions(-) > > -- > 2.6.4 >