diff options
author | David Malcolm <dmalcolm@redhat.com> | 2013-05-06 14:51:13 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2013-05-06 14:51:13 -0400 |
commit | ebe03205468336847c95864eaabffb7dccb3727e (patch) | |
tree | 85e7020cb341916f19b7aa24fb9e4a41f9326990 /Tools/gdb/libpython.py | |
parent | 9fca0e8466f202eeef2a89584a6722c21db1bf0b (diff) | |
parent | e6c375f8197801d5c00dea6921c3c996d229c400 (diff) | |
download | cpython-ebe03205468336847c95864eaabffb7dccb3727e.tar.gz |
#17833: merge with 3.3
Diffstat (limited to 'Tools/gdb/libpython.py')
-rw-r--r-- | Tools/gdb/libpython.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 84d4fa31c4..ef69359d1e 100644 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1160,7 +1160,9 @@ class PyUnicodeObjectPtr(PyObjectPtr): # Convert the int code points to unicode characters, and generate a # local unicode instance. # This splits surrogate pairs if sizeof(Py_UNICODE) is 2 here (in gdb). - result = u''.join([_unichr(ucs) for ucs in Py_UNICODEs]) + result = u''.join([ + (_unichr(ucs) if ucs <= 0x10ffff else '\ufffd') + for ucs in Py_UNICODEs]) return result def write_repr(self, out, visited): |