This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question on pr python/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);
          return make_cv_type (0, 1, type, NULL);
+         return type;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]