2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-prettyprint.py
index 85c50aaae17fec93ca292c59b9ab096ca800fbb9..9a0d1072b2de57c73f923f8cab879398035d4d46 100644 (file)
@@ -112,6 +112,18 @@ class pp_ns:
     def display_hint (self):
         return 'string'
 
+class pp_ls:
+    "Print a std::basic_string of some kind"
+
+    def __init__(self, val):
+        self.val = val
+
+    def to_string(self):
+        return self.val['lazy_str'].lazy_string()
+
+    def display_hint (self):
+        return 'string'
+
 class pp_outer:
     "Print struct outer"
 
@@ -184,6 +196,9 @@ def register_pretty_printers ():
     pretty_printers_dict[re.compile ('^struct ns$')]  = pp_ns
     pretty_printers_dict[re.compile ('^ns$')]  = pp_ns
 
+    pretty_printers_dict[re.compile ('^struct lazystring$')]  = pp_ls
+    pretty_printers_dict[re.compile ('^lazystring$')]  = pp_ls
+
     pretty_printers_dict[re.compile ('^struct outerstruct$')]  = pp_outer
     pretty_printers_dict[re.compile ('^outerstruct$')]  = pp_outer
 
This page took 0.023886 seconds and 4 git commands to generate.