On 15/07/14 13:03 +0100, Jonathan Wakely wrote:
On 14/07/14 20:31 +0100, Jonathan Wakely wrote:
This adds printers for the types in the std::experimental namespace.

This should fix the test failures that Paolo and HJ are seeing, older
versions of GDB didn't have the gdb.Type.name attribute.

(I suppose I could have just put the full basic_string<char, ...> name
in explicitly instead of using lookup_type, but I'll just make this
fix for now.)

Committed to trunk.
commit 827e07f7e08bc993a284996f7772b04f82ee7fc9
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Wed Jul 23 11:40:02 2014 +0100

    	* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Convert type
    	to string instead of using gdb.Type.name attribute.

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 625396b..15d7a88 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -899,7 +899,7 @@ class StdExpAnyPrinter(SingleObjContainerPrinter):
                 raise ValueError("Unknown manager function in std::experimental::any")
 
             # FIXME need to expand 'std::string' so that gdb.lookup_type works
-            mgrname = re.sub("std::string(?!\w)", gdb.lookup_type('std::string').strip_typedefs().name, m.group(1))
+            mgrname = re.sub("std::string(?!\w)", str(gdb.lookup_type('std::string').strip_typedefs()), m.group(1))
             mgrtype = gdb.lookup_type(mgrname)
             self.contained_type = mgrtype.template_argument(0)
             valptr = None

Reply via email to