From: Phil Muldoon <pmuldoon@redhat.com>
To: Project Archer <archer@sourceware.org>
Subject: Question on pr python/11060
Date: Fri, 15 Jan 2010 16:35:00 -0000 [thread overview]
Message-ID: <4B50992F.3080908@redhat.com> (raw)
http://sourceware.org/bugzilla/show_bug.cgi?id=11060
I believe this is happening as DEMANGLE_COMPONENT_LITERAL is not being accounted for in the type lookup. In this case of a template argument resolving to LITERAL, is it ok just to return the type backing the argument without further manipulation? I spent a few hours this morning looking for side-effects but came up blank. Types seems to resolve as expected (ie in the <42> case it is an int type). Thoughts?
Rough patch:
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index a97c125..bcd3f4f 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -475,7 +475,8 @@ typy_lookup_type (struct demangle_component *demangled)
if (demangled_type == DEMANGLE_COMPONENT_POINTER
|| demangled_type == DEMANGLE_COMPONENT_REFERENCE
|| demangled_type == DEMANGLE_COMPONENT_CONST
- || demangled_type == DEMANGLE_COMPONENT_VOLATILE)
+ || demangled_type == DEMANGLE_COMPONENT_VOLATILE
+ || demangled_type == DEMANGLE_COMPONENT_LITERAL)
{
type = typy_lookup_type (demangled->u.s_binary.left);
if (! type)
@@ -491,6 +492,8 @@ typy_lookup_type (struct demangle_component *demangled)
return make_cv_type (1, 0, type, NULL);
case DEMANGLE_COMPONENT_VOLATILE:
return make_cv_type (0, 1, type, NULL);
+ case DEMANGLE_COMPONENT_LITERAL:
+ return type;
}
}
next reply other threads:[~2010-01-15 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 16:35 Phil Muldoon [this message]
2010-01-15 17:04 ` Tom Tromey
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=4B50992F.3080908@redhat.com \
--to=pmuldoon@redhat.com \
--cc=archer@sourceware.org \
/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).