[Lldb-commits] [PATCH] D16736: Always write the session log file in UTF-8

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 29 17:26:42 PST 2016


Hmm, that almost looks to me like it's finding a real bug.  Which it
probably is, because higher up the callstack it's reading the response of a
memory send.  I'm guessing that the response includes non-printable
characters (raw memory data) that wasn't being written before but was being
silently ignored, and now it's giving an error.

Can you try passing errors='replace' to encoded_file.open()?  Then open the
log file and see what's in it.

On Fri, Jan 29, 2016 at 4:20 PM Todd Fiala <todd.fiala at gmail.com> wrote:

> tfiala added a comment.
>
> The only test I see fail with this is:
> TestGDBRemoteMemoryRead.py:
>
>
>
>
> ERROR: test_memory_read_dwarf (TestGDBRemoteMemoryRead.MemoryReadTestCase)
> --------------------------------------------------------------------------
>
> Traceback (most recent call last):
>
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/test/lldbtest.py",
> line 2289, in dwarf_test_method
>     return attrvalue(self)
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGDBRemoteMemoryRead.py",
> line 37, in test_memory_read
>     self.match("process plugin packet send x%x,%x" % (pc, size),
> ["response:", memory])
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/test/lldbtest.py",
> line 2615, in match
>     self.runCmd(str, msg=msg, trace = (True if trace else False), check =
> not error)
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/test/lldbtest.py",
> line 2591, in runCmd
>     print(self.res.GetError(), file=sbuf)
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/test/lldbtest.py",
> line 267, in __exit__
>     print(self.getvalue(), file=self.session)
>   File
> "/Users/tfiala/lldb/tot/git-svn/lldb/packages/Python/lldbsuite/support/encoded_file.py",
> line 32, in impl
>     s = s.decode(encoding)
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py",
> line 16, in decode
>     return codecs.utf_8_decode(input, errors, True)
>
> UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 90:
> invalid start byte
>
>
> http://reviews.llvm.org/D16736
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160130/9bfe2f43/attachment.html>


More information about the lldb-commits mailing list