[Lldb-commits] [lldb] r126867 - /lldb/trunk/test/python_api/process/TestProcessAPI.py

Johnny Chen johnny.chen at apple.com
Wed Mar 2 11:49:27 PST 2011


Author: johnny
Date: Wed Mar  2 13:49:27 2011
New Revision: 126867

URL: http://llvm.org/viewvc/llvm-project?rev=126867&view=rev
Log:
Add some comments.

Modified:
    lldb/trunk/test/python_api/process/TestProcessAPI.py

Modified: lldb/trunk/test/python_api/process/TestProcessAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/process/TestProcessAPI.py?rev=126867&r1=126866&r2=126867&view=diff
==============================================================================
--- lldb/trunk/test/python_api/process/TestProcessAPI.py (original)
+++ lldb/trunk/test/python_api/process/TestProcessAPI.py Wed Mar  2 13:49:27 2011
@@ -174,7 +174,9 @@
         # OK, let's get the hex location of the variable.
         location = int(val.GetLocation(frame), 16)
 
+        # Note that the canonical from of the bytearray is little endian.
         from lldbutil import int_to_bytearray, bytearray_to_int
+
         byteSize = val.GetByteSize()
         bytes = int_to_bytearray(256, byteSize)
 
@@ -208,6 +210,8 @@
         content = self.process.ReadMemory(location, byteSize, error)
         if not error.Success():
             self.fail("SBProcess.ReadMemory() failed")
+
+        # Use "ascii" as the encoding because each element of 'content' is in the range [0..255].
         new_bytes = bytearray(content, "ascii")
 
         # The bytearray_to_int utility function expects a little endian bytearray.





More information about the lldb-commits mailing list