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:
* python/Makefile.in: Rebuild.
* python/hook.in: Compute module path relative to objfile.
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):
"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:
# 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