This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Question on pr python/11060
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Fri, 15 Jan 2010 16:34:55 +0000
- Subject: Question on pr python/11060
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;
}
}