[Lldb-commits] [lldb] r150766 - in /lldb/trunk: source/Core/DataExtractor.cpp test/functionalities/memory/read/TestMemoryRead.py

Johnny Chen johnny.chen at apple.com
Thu Feb 16 15:09:09 PST 2012


Author: johnny
Date: Thu Feb 16 17:09:08 2012
New Revision: 150766

URL: http://llvm.org/viewvc/llvm-project?rev=150766&view=rev
Log:
memory read -f X doesn't print anything (lldb should warn when encountering an unsupported byte size)
Also add a test sequence for it.

rdar://problem/10876841

Modified:
    lldb/trunk/source/Core/DataExtractor.cpp
    lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=150766&r1=150765&r2=150766&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Thu Feb 16 17:09:08 2012
@@ -1756,7 +1756,7 @@
                 s->Printf ("%s", float_cstr);
                 break;
             }
-            else if (sizeof(long double) * 2 == item_byte_size)
+            else
             {
                 s->Printf ("unsupported hex float byte size %u", item_byte_size);
                 return start_offset;

Modified: lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py?rev=150766&r1=150765&r2=150766&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py (original)
+++ lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py Thu Feb 16 17:09:08 2012
@@ -85,6 +85,11 @@
         self.expect("memory read --format char[] --size 7 --count 1 `&my_string`",
             substrs = ['abcdefg'])
 
+        # (lldb) memory read --format 'hex float' --size 16 `&argc`
+        # 0x7fff5fbff9a0: unsupported hex float byte size 16
+        self.expect("memory read --format 'hex float' --size 16 `&argc`",
+            substrs = ['unsupported hex float byte size'])
+
 
 if __name__ == '__main__':
     import atexit





More information about the lldb-commits mailing list