[Bug python/12285] New: printing gdb.Value with non-ascii bytes or unicode characters raise UnicodeErrors

markflorisson88 at gmail dot com sourceware-bugzilla@sourceware.org
Fri Dec 3 10:08:00 GMT 2010


http://sourceware.org/bugzilla/show_bug.cgi?id=12285

           Summary: printing gdb.Value with non-ascii bytes or unicode
                    characters raise UnicodeErrors
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: markflorisson88@gmail.com


(gdb) python print gdb.Value(u'\xff')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in position 1:
ordinal not in range(128)
Error while executing Python code.
(gdb) python print gdb.Value('\xff')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0:
unexpected code byte
Error while executing Python code.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Gdb-prs mailing list