Oops, really fix gdb/libpython.py for not ready Unicode strings
This commit is contained in:
parent
9028a10144
commit
f16a350baf
@ -1130,12 +1130,13 @@ class PyUnicodeObjectPtr(PyObjectPtr):
|
|||||||
ascii = compact['_base']
|
ascii = compact['_base']
|
||||||
state = ascii['state']
|
state = ascii['state']
|
||||||
is_compact_ascii = (int(state['ascii']) and int(state['compact']))
|
is_compact_ascii = (int(state['ascii']) and int(state['compact']))
|
||||||
field_length = long(ascii['length'])
|
|
||||||
if not int(state['ready']):
|
if not int(state['ready']):
|
||||||
# string is not ready
|
# string is not ready
|
||||||
|
field_length = long(compact['wstr_length'])
|
||||||
may_have_surrogates = True
|
may_have_surrogates = True
|
||||||
field_str = ascii['wstr']
|
field_str = ascii['wstr']
|
||||||
else:
|
else:
|
||||||
|
field_length = long(ascii['length'])
|
||||||
if is_compact_ascii:
|
if is_compact_ascii:
|
||||||
field_str = ascii.address + 1
|
field_str = ascii.address + 1
|
||||||
elif int(state['compact']):
|
elif int(state['compact']):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user