aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-06-10 22:59:01 +0000
committerTom Tromey <tromey@gcc.gnu.org>2009-06-10 22:59:01 +0000
commit3af622115bbd24da0efc5bfcbcbee80257f75404 (patch)
treefa89c7f406cbe09a54f5e3c2622ac89e0c8441e0 /libstdc++-v3/python
parent35204bbe768b28492d9d36978291779ed18d0ed7 (diff)
downloadgcc-3af622115bbd24da0efc5bfcbcbee80257f75404.zip
gcc-3af622115bbd24da0efc5bfcbcbee80257f75404.tar.gz
gcc-3af622115bbd24da0efc5bfcbcbee80257f75404.tar.bz2
printers.py (lookup_function): Remove extra ';'.
* 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
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 7b22e8a..4dddd8f 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -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