]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/61835 (Invalid comment on pretty printers breaks gdb)
authorJonathan Wakely <jwakely@redhat.com>
Fri, 18 Jul 2014 15:56:00 +0000 (16:56 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 18 Jul 2014 15:56:00 +0000 (16:56 +0100)
PR libstdc++/61835
* python/libstdcxx/v6/printers.py (TemplateTypePrinter): Use
raw string.
(SingleObjContainerPrinter): Check if type printers are in use.

From-SVN: r212822

libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py

index fcaa8a146519e90a5e7db2dce7a245577544702a..74cb499d60ce81e5485013d09ebe88d9edb21b21 100644 (file)
@@ -1,3 +1,10 @@
+2014-07-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/61835
+       * python/libstdcxx/v6/printers.py (TemplateTypePrinter): Use
+       raw string.
+       (SingleObjContainerPrinter): Check if type printers are in use.
+
 2014-07-16  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/ext/random: Minor formatting and cosmetic tweaks.
index af41f1ffaeb443b357e05414c7772955a2fa51d9..625396b4459fbb8a46d74c0d1872117076aeb391 100644 (file)
@@ -845,6 +845,9 @@ class SingleObjContainerPrinter(object):
 
     def _recognize(self, type):
         """Return TYPE as a string after applying type printers"""
+        global _use_type_printing
+        if not _use_type_printing:
+            return str(type)
         return gdb.types.apply_type_recognizers(gdb.types.get_type_recognizers(),
                                                 type) or str(type)
 
@@ -1043,7 +1046,7 @@ class Printer(object):
 libstdcxx_printer = None
 
 class TemplateTypePrinter(object):
-    """A type printer for class templates.
+    r"""A type printer for class templates.
 
     Recognizes type names that match a regular expression.
     Replaces them with a formatted string which can use replacement field