Skip to content
Browse files

"Fix" printing of gdb.Values with non-ascii characters or unicode ord…

…inals
  • Loading branch information...
1 parent 3be21c3 commit 45e160567cb2faffc26aa0f3125492d47e94b980 @markflorisson markflorisson committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 Cython/Debugger/libpython.py
View
4 Cython/Debugger/libpython.py
@@ -59,6 +59,10 @@
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*

0 comments on commit 45e1605

Please sign in to comment.
Something went wrong with that request. Please try again.