diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py | 9 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py b/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py index 085c9bdd989..4fa570fc13a 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py @@ -89,3 +89,12 @@ class MemoryReadTestCase(TestBase): # 0x7fff5fbff598: error: unsupported byte size (20) for float format self.expect("memory read --format 'float' --count 1 --size 20 `&my_double`", substrs = ['unsupported byte size (20) for float format']) + + self.expect('memory read --type int --count 5 `&my_ints[0]`', + substrs=['(int) 0x', '2','4','6','8','10']) + + self.expect('memory read --type int --count 5 --format hex `&my_ints[0]`', + substrs=['(int) 0x', '0x','0a']) + + self.expect('memory read --type int --count 5 --offset 5 `&my_ints[0]`', + substrs=['(int) 0x', '12', '14','16','18', '20']) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp index b4d7809d27c..cd367ff318a 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp @@ -12,6 +12,7 @@ int main (int argc, char const *argv[]) { char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0}; double my_double = 1234.5678; + int my_ints[] = {2,4,6,8,10,12,14,16,18,20,22}; printf("my_string=%s\n", my_string); // Set break point at this line. printf("my_double=%g\n", my_double); return 0; |