projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3be21c3
)
"Fix" printing of gdb.Values with non-ascii characters or unicode ordinals
author
Mark Florisson
<markflorisson88@gmail.com>
Thu, 2 Dec 2010 20:57:02 +0000
(21:57 +0100)
committer
Mark Florisson
<markflorisson88@gmail.com>
Thu, 2 Dec 2010 20:57:02 +0000
(21:57 +0100)
Cython/Debugger/libpython.py
patch
|
blob
|
history
diff --git
a/Cython/Debugger/libpython.py
b/Cython/Debugger/libpython.py
index 38bc7b81775d6cca090beabd13e04001f17ab558..07a57a49c0f7dde4fed380bb4f6c2cc63a4424cd 100644
(file)
--- a/
Cython/Debugger/libpython.py
+++ b/
Cython/Debugger/libpython.py
@@
-59,6
+59,10
@@
import itertools
import gdb
+# I think this is the only way to fix this bug :'(
+# http://sourceware.org/bugzilla/show_bug.cgi?id=12285
+reload(sys).setdefaultencoding('UTF-8')
+
# Look up the gdb.Type for some standard types:
_type_char_ptr = gdb.lookup_type('char').pointer() # char*
_type_unsigned_char_ptr = gdb.lookup_type('unsigned char').pointer() # unsigned char*