Skip to content

Commit

Permalink
"Fix" printing of gdb.Values with non-ascii characters or unicode ord…
Browse files Browse the repository at this point in the history
…inals
  • Loading branch information
markflorisson committed Dec 2, 2010
1 parent 3be21c3 commit 45e1605
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cython/Debugger/libpython.py
Expand Up @@ -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*
Expand Down

0 comments on commit 45e1605

Please sign in to comment.