summaryrefslogtreecommitdiffstats
path: root/Tools/gdb
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-04 21:34:01 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-04 21:34:01 (GMT)
commitf16a350bafbf617f876bfbbd4b1c8f2636efacff (patch)
treea67845c6f80611599f9b7a7da47a0e87aa053b3d /Tools/gdb
parent9028a101440bd1526cf1fa0e77db8b4b1200fc29 (diff)
downloadcpython-f16a350bafbf617f876bfbbd4b1c8f2636efacff.zip
cpython-f16a350bafbf617f876bfbbd4b1c8f2636efacff.tar.gz
cpython-f16a350bafbf617f876bfbbd4b1c8f2636efacff.tar.bz2
Oops, really fix gdb/libpython.py for not ready Unicode strings
Diffstat (limited to 'Tools/gdb')
-rw-r--r--Tools/gdb/libpython.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 3fea68f..1e38c26 100644
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -1130,12 +1130,13 @@ class PyUnicodeObjectPtr(PyObjectPtr):
ascii = compact['_base']
state = ascii['state']
is_compact_ascii = (int(state['ascii']) and int(state['compact']))
- field_length = long(ascii['length'])
if not int(state['ready']):
# string is not ready
+ field_length = long(compact['wstr_length'])
may_have_surrogates = True
field_str = ascii['wstr']
else:
+ field_length = long(ascii['length'])
if is_compact_ascii:
field_str = ascii.address + 1
elif int(state['compact']):