From: Artemiy Volkov <artemiyv@acm.org>
To: gdb-patches@sourceware.org
Cc: keiths@redhat.com, palves@redhat.com, Artemiy Volkov <artemiyv@acm.org>
Subject: [PATCH v3 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames
Date: Sat, 05 Mar 2016 03:20:00 -0000 [thread overview]
Message-ID: <1457147955-21871-6-git-send-email-artemiyv@acm.org> (raw)
In-Reply-To: <1457147955-21871-1-git-send-email-artemiyv@acm.org>
This patch fixes demangling of names containing rvalue reference typenames by
handling DEMANGLE_COMPONENT_RVALUE_REFERENCE demangle component.
gdb/ChangeLog:
2016-03-04 Artemiy Volkov <artemiyv@acm.org>
* cp-name-parser.y (ptr_operator): Handle the '&&' token in
typename.
* cp-support.c (replace_typedefs): Handle
DEMANGLE_COMPONENT_RVALUE_REFERENCE.
* python/py-type.c (typy_lookup_type): Likewise.
---
gdb/cp-name-parser.y | 4 ++++
gdb/cp-support.c | 1 +
gdb/python/py-type.c | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
index c6a5c34..33fdcea 100644
--- a/gdb/cp-name-parser.y
+++ b/gdb/cp-name-parser.y
@@ -769,6 +769,10 @@ ptr_operator : '*' qualifiers_opt
{ $$.comp = make_empty (DEMANGLE_COMPONENT_REFERENCE);
$$.comp->u.s_binary.left = $$.comp->u.s_binary.right = NULL;
$$.last = &d_left ($$.comp); }
+ | ANDAND
+ { $$.comp = make_empty (DEMANGLE_COMPONENT_RVALUE_REFERENCE);
+ $$.comp->u.s_binary.left = $$.comp->u.s_binary.right = NULL;
+ $$.last = &d_left ($$.comp); }
| nested_name '*' qualifiers_opt
{ $$.comp = make_empty (DEMANGLE_COMPONENT_PTRMEM_TYPE);
$$.comp->u.s_binary.left = $1.comp;
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index df127c4..1dde382 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -520,6 +520,7 @@ replace_typedefs (struct demangle_parse_info *info,
case DEMANGLE_COMPONENT_RESTRICT_THIS:
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
replace_typedefs (info, d_left (ret_comp), finder, data);
break;
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 6103a2b..4ec920e 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -811,6 +811,7 @@ typy_lookup_type (struct demangle_component *demangled,
if (demangled_type == DEMANGLE_COMPONENT_POINTER
|| demangled_type == DEMANGLE_COMPONENT_REFERENCE
+ || demangled_type == DEMANGLE_COMPONENT_RVALUE_REFERENCE
|| demangled_type == DEMANGLE_COMPONENT_CONST
|| demangled_type == DEMANGLE_COMPONENT_VOLATILE)
{
@@ -829,6 +830,9 @@ typy_lookup_type (struct demangle_component *demangled,
case DEMANGLE_COMPONENT_REFERENCE:
rtype = lookup_lvalue_reference_type (type);
break;
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
+ rtype = lookup_rvalue_reference_type (type);
+ break;
case DEMANGLE_COMPONENT_POINTER:
rtype = lookup_pointer_type (type);
break;
--
2.7.2
next prev parent reply other threads:[~2016-03-05 3:20 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 22:35 [PATCH 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2015-12-20 22:35 ` [PATCH 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2015-12-20 22:35 ` [PATCH 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2015-12-20 22:35 ` [PATCH 10/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2015-12-20 22:35 ` [PATCH 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2015-12-20 22:35 ` [PATCH 09/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2015-12-20 22:35 ` [PATCH 08/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2015-12-20 22:35 ` [PATCH 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2015-12-20 22:35 ` [PATCH 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2015-12-30 19:17 ` Pedro Alves
2015-12-20 22:35 ` [PATCH 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2015-12-20 22:35 ` [PATCH 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2015-12-20 22:35 ` [PATCH 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2015-12-28 21:09 ` [PATCH 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2016-01-20 9:42 ` Yao Qi
2016-01-19 18:54 ` [PATCH v2 " Artemiy Volkov
2016-01-19 18:54 ` [PATCH v2 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-02-19 18:49 ` Keith Seitz
2016-02-23 7:04 ` Artemiy Volkov
2016-02-25 1:22 ` Keith Seitz
2016-02-25 1:32 ` Artemiy Volkov
2016-02-25 1:41 ` Keith Seitz
2016-02-25 1:45 ` Artemiy Volkov
2016-01-19 18:54 ` [PATCH v2 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-02-19 18:54 ` Keith Seitz
2016-01-19 18:54 ` [PATCH v2 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-02-19 18:56 ` Keith Seitz
2016-01-19 18:54 ` [PATCH v2 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-02-19 18:52 ` Keith Seitz
2016-01-19 18:54 ` [PATCH v2 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-02-19 18:53 ` Keith Seitz
2016-01-19 18:54 ` [PATCH v2 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-02-19 18:50 ` Keith Seitz
2016-01-19 18:55 ` [PATCH v2 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2016-02-19 18:57 ` Keith Seitz
2016-01-19 18:55 ` [PATCH v2 09/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-02-19 19:46 ` Keith Seitz
2016-01-19 18:55 ` [PATCH v2 08/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-02-19 19:01 ` Keith Seitz
2016-02-26 5:08 ` Artemiy Volkov
2016-01-19 18:55 ` [PATCH v2 10/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-02-19 19:48 ` Keith Seitz
2016-01-19 18:55 ` [PATCH v2 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-02-19 20:05 ` Keith Seitz
2016-02-19 18:49 ` [PATCH v2 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Keith Seitz
2016-02-23 6:04 ` Artemiy Volkov
2016-03-05 3:20 ` [PATCH v3 " Artemiy Volkov
2016-03-05 3:20 ` [PATCH v3 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-03-16 22:08 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-03-16 22:32 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-03-16 22:48 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-03-16 22:45 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-03-16 22:41 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-03-16 22:26 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-03-16 22:22 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-03-16 22:23 ` Keith Seitz
2016-03-05 3:20 ` [PATCH v3 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-03-16 22:19 ` Keith Seitz
2016-03-20 12:10 ` Artemiy Volkov
2016-03-05 3:20 ` [PATCH v3 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2016-03-16 22:28 ` Keith Seitz
2016-03-05 3:20 ` Artemiy Volkov [this message]
2016-03-16 22:25 ` [PATCH v3 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Keith Seitz
2016-03-21 21:02 ` [PATCH v4 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-03-31 20:35 ` Keith Seitz
2016-04-02 8:28 ` Artemiy Volkov
2016-04-02 8:45 ` Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-03-21 21:02 ` [PATCH v4 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_TAG_rvalue_reference type Artemiy Volkov
2016-03-21 21:03 ` [PATCH v4 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-03-21 21:03 ` [PATCH v4 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-03-31 20:37 ` Keith Seitz
2016-04-02 8:42 ` Artemiy Volkov
2016-03-21 21:03 ` [PATCH v4 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-03-21 21:15 ` [PATCH v4 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-03-31 20:35 ` [PATCH v4 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Keith Seitz
2016-04-02 8:48 ` Artemiy Volkov
2016-04-05 18:23 ` Pedro Alves
2016-04-06 8:31 ` Artemiy Volkov
2016-04-12 11:49 ` Pedro Alves
2016-04-19 15:51 ` Artemiy Volkov
2016-04-22 11:31 ` Pedro Alves
2016-06-06 19:22 ` [PATCH v5 00/11] [PR gdb/14441] Support C++11 " Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_TAG_rvalue_reference type Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-06-20 19:04 ` Pedro Alves
2016-06-06 19:23 ` [PATCH v5 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-06-20 19:07 ` Pedro Alves
2016-06-06 19:23 ` [PATCH v5 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-06-06 19:23 ` [PATCH v5 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-06-19 15:08 ` [PATCH v5 00/11] [PR gdb/14441] Support C++11 rvalue references in gdb Artemiy Volkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457147955-21871-6-git-send-email-artemiyv@acm.org \
--to=artemiyv@acm.org \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).