summaryrefslogtreecommitdiff
path: root/Tools/gdb/libpython.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-04 22:34:01 +0100
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-04 22:34:01 +0100
commitf7d16daa4c748adc0802627e3e7924760f7ebcdc (patch)
tree5761770c162bd7bd61183e12f6121ec08cca31ff /Tools/gdb/libpython.py
parentdf84710623e112e30a9313e420eeb17f5115ceae (diff)
downloadcpython-f7d16daa4c748adc0802627e3e7924760f7ebcdc.tar.gz
Oops, really fix gdb/libpython.py for not ready Unicode strings
Diffstat (limited to 'Tools/gdb/libpython.py')
-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 3fea68f8e3..1e38c26162 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']):