aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-07-18 16:56:00 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2014-07-18 16:56:00 +0100
commitfaf7f829a84986dbd7b6e088633f18193486f272 (patch)
tree2a0d47cbf99a2336822aa5cece1348e3c9ad65f7
parent4ac2a3f0f7995ca4eb364fc3e76e292d703a0474 (diff)
downloadgcc-faf7f829a84986dbd7b6e088633f18193486f272.zip
gcc-faf7f829a84986dbd7b6e088633f18193486f272.tar.gz
gcc-faf7f829a84986dbd7b6e088633f18193486f272.tar.bz2
re PR libstdc++/61835 (Invalid comment on pretty printers breaks gdb)
PR libstdc++/61835 * python/libstdcxx/v6/printers.py (TemplateTypePrinter): Use raw string. (SingleObjContainerPrinter): Check if type printers are in use. From-SVN: r212822
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py5
2 files changed, 11 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index fcaa8a1..74cb499 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index af41f1f..625396b 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -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