David Coles added the comment: I ended up with a very similar looking patch - and so merged my changes into Pitrou's patch.
I also had a go at fixing up the `test_gdb` unit test, which revealed a few more string/unicode issues. Finally tracked them down to the `write_unicode` function. Sadly the `write` function in GDB's Python API only accepts unicode strings, hence we must pre-backslash escape for C-string encoding (either Python's default encoding or utf-8 in Python 3.1+) then turn it back into a unicode string again to avoid a TypeError. Yuck. The patch almost applies on Python 2.7, but needs a little bit of massaging due to slight differences in Tools/gdb/libpython.py. Need to test the new unicode changes haven't broken anything and then I'll upload a patch for Python 2.7. ---------- Added file: http://bugs.python.org/file32271/gdb_py3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com