From c7e828eef148c75606d470b4667baf24ec03a058 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 24 Aug 2013 00:16:19 +0000 Subject: [PATCH] Don't recommend using bytearray(buf, 'ascii') for binary data read with SBProcess::ReadMemory - it will fail for anything with the high bit set. llvm-svn: 189154 --- lldb/scripts/Python/interface/SBProcess.i | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lldb/scripts/Python/interface/SBProcess.i b/lldb/scripts/Python/interface/SBProcess.i index 6f22d9ad1dc6..5f6c7e8487b3 100644 --- a/lldb/scripts/Python/interface/SBProcess.i +++ b/lldb/scripts/Python/interface/SBProcess.i @@ -251,8 +251,7 @@ public: # Read 4 bytes from address 'addr' and assume error.Success() is True. content = process.ReadMemory(addr, 4, error) - # Use 'ascii' encoding as each byte of 'content' is within [0..255]. - new_bytes = bytearray(content, 'ascii') + new_bytes = bytearray(content) ") ReadMemory; size_t ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);