[Lldb-commits] [lldb] r189154 - Don't recommend using bytearray(buf, 'ascii') for binary data read with
Jason Molenda
jmolenda at apple.com
Fri Aug 23 17:16:19 PDT 2013
Author: jmolenda
Date: Fri Aug 23 19:16:19 2013
New Revision: 189154
URL: http://llvm.org/viewvc/llvm-project?rev=189154&view=rev
Log:
Don't recommend using bytearray(buf, 'ascii') for binary data read with
SBProcess::ReadMemory - it will fail for anything with the high bit set.
Modified:
lldb/trunk/scripts/Python/interface/SBProcess.i
Modified: lldb/trunk/scripts/Python/interface/SBProcess.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBProcess.i?rev=189154&r1=189153&r2=189154&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBProcess.i (original)
+++ lldb/trunk/scripts/Python/interface/SBProcess.i Fri Aug 23 19:16:19 2013
@@ -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);
More information about the lldb-commits
mailing list