]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
printers.py (lookup_function): Remove extra ';'.
authorTom Tromey <tromey@redhat.com>
Wed, 10 Jun 2009 22:59:01 +0000 (22:59 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 10 Jun 2009 22:59:01 +0000 (22:59 +0000)
* python/libstdcxx/v6/printers.py (lookup_function): Remove extra
';'.
(build_libstdcxx_dictionary): Accept shortened form of
basic_string names.
(StdStringPrinter.to_string): Remove reference to WideEncoding.

From-SVN: r148358

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

index 642fff10c9863e9ba166e8d427648d6af4c4590c..b07378d10c1b4e52e2f54fe9ce3bf3fc50e8d26c 100644 (file)
@@ -1,3 +1,11 @@
+2009-06-10  Tom Tromey  <tromey@redhat.com>
+
+       * python/libstdcxx/v6/printers.py (lookup_function): Remove extra
+       ';'.
+       (build_libstdcxx_dictionary): Accept shortened form of
+       basic_string names.
+       (StdStringPrinter.to_string): Remove reference to WideEncoding.
+
 2009-06-10  Tom Tromey  <tromey@redhat.com>
 
        PR libstdc++/40289:
index 7b22e8a0bdc0afd469b72722a32e24a0cc33cdf5..4dddd8f60f9d696874d10fda6956f5c51d0e2bbf 100644 (file)
@@ -452,8 +452,6 @@ class StdStringPrinter:
             encoding = gdb.parameter('target-charset')
         elif encoding == 1:
             encoding = gdb.parameter('target-wide-charset')
-        elif isinstance(encoding, WideEncoding):
-            encoding = encoding.value
         return self.val['_M_dataplus']['_M_p'].string(encoding)
 
     def display_hint (self):
@@ -559,7 +557,7 @@ def lookup_function (val):
     "Look-up and return a pretty-printer that can print val."
 
     # Get the type.
-    type = val.type;
+    type = val.type
 
     # If it points to a reference, get the reference.
     if type.code == gdb.TYPE_CODE_REF:
@@ -587,10 +585,10 @@ def build_libstdcxx_dictionary ():
     # libstdc++ objects requiring pretty-printing.
     # In order from:
     # http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01847.html
-    pretty_printers_dict[re.compile('^std::basic_string<char,.*>$')] = lambda val: StdStringPrinter(0, val)
-    pretty_printers_dict[re.compile('^std::basic_string<wchar_t,.*>$')] = lambda val: StdStringPrinter(1, val)
-    pretty_printers_dict[re.compile('^std::basic_string<char16_t,.*>$')] = lambda val: StdStringPrinter('UTF-16', val)
-    pretty_printers_dict[re.compile('^std::basic_string<char32_t,.*>$')] = lambda val: StdStringPrinter('UTF-32', val)
+    pretty_printers_dict[re.compile('^std::basic_string<char(,.*)?>$')] = lambda val: StdStringPrinter(0, val)
+    pretty_printers_dict[re.compile('^std::basic_string<wchar_t(,.*)?>$')] = lambda val: StdStringPrinter(1, val)
+    pretty_printers_dict[re.compile('^std::basic_string<char16_t(,.*)?>$')] = lambda val: StdStringPrinter('UTF-16', val)
+    pretty_printers_dict[re.compile('^std::basic_string<char32_t(,.*)?>$')] = lambda val: StdStringPrinter('UTF-32', val)
     pretty_printers_dict[re.compile('^std::bitset<.*>$')] = StdBitsetPrinter
     pretty_printers_dict[re.compile('^std::deque<.*>$')] = StdDequePrinter
     pretty_printers_dict[re.compile('^std::list<.*>$')] = StdListPrinter