Don't recommend using bytearray(buf, 'ascii') for binary data read with
authorJason Molenda <jmolenda@apple.com>
Sat, 24 Aug 2013 00:16:19 +0000 (00:16 +0000)
committerJason Molenda <jmolenda@apple.com>
Sat, 24 Aug 2013 00:16:19 +0000 (00:16 +0000)
SBProcess::ReadMemory - it will fail for anything with the high bit set.

llvm-svn: 189154

lldb/scripts/Python/interface/SBProcess.i

index 6f22d9a..5f6c7e8 100644 (file)
@@ -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);