diff options
author | Enrico Granata <egranata@apple.com> | 2013-01-09 20:12:53 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-01-09 20:12:53 +0000 |
commit | 3a91e146f4e40ce9b44af3619551f6b6d9bb3b7f (patch) | |
tree | a8189b1ca79564e541948f3473f118db42b58404 /test/lang/c | |
parent | ea0bb4d45c14447a2fe9be9f4bd8e79a84513537 (diff) | |
download | lldb-3a91e146f4e40ce9b44af3619551f6b6d9bb3b7f.tar.gz |
<rdar://problem/12028723>
Adding useful formatting options to the expression (expr) command.
As a side effect of this change, the -d option now supports the same three-values enumeration that frame variables uses (run, don't run, none) instead of a boolean like it did previously
These options do not apply to print, p or po because these are aliased to not take any options.
In order to use them, use expression or expr.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lang/c')
-rw-r--r-- | test/lang/c/forward/TestForwardDeclaration.py | 2 | ||||
-rw-r--r-- | test/lang/c/shared_lib/TestSharedLib.py | 4 | ||||
-rw-r--r-- | test/lang/c/strings/TestCStrings.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/test/lang/c/forward/TestForwardDeclaration.py b/test/lang/c/forward/TestForwardDeclaration.py index 9ae1fe063..7ded56c82 100644 --- a/test/lang/c/forward/TestForwardDeclaration.py +++ b/test/lang/c/forward/TestForwardDeclaration.py @@ -54,7 +54,7 @@ class ForwardDeclarationTestCase(TestBase): '(int) b = 2']) # And so should this. - self.expect("expression *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY, + self.expect("expression --show-types -- *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY, substrs = ['(bar)', '(int) a = 1', '(int) b = 2']) diff --git a/test/lang/c/shared_lib/TestSharedLib.py b/test/lang/c/shared_lib/TestSharedLib.py index eb9a4c0a0..8ef7bdef6 100644 --- a/test/lang/c/shared_lib/TestSharedLib.py +++ b/test/lang/c/shared_lib/TestSharedLib.py @@ -66,7 +66,7 @@ class SharedLibTestCase(TestBase): self.common_setup() # This should display correctly. - self.expect("expression *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY, + self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["(foo)", "(sub_foo)", "other_element = 3"]) @unittest2.expectedFailure @@ -76,7 +76,7 @@ class SharedLibTestCase(TestBase): self.common_setup() # This should display correctly. - self.expect("frame variable *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY, + self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["(foo)", "(sub_foo)", "other_element = 3"]) if __name__ == '__main__': diff --git a/test/lang/c/strings/TestCStrings.py b/test/lang/c/strings/TestCStrings.py index 089e23e86..0a1a82667 100644 --- a/test/lang/c/strings/TestCStrings.py +++ b/test/lang/c/strings/TestCStrings.py @@ -53,9 +53,9 @@ class CStringsTestCase(TestBase): startstr = "(const char) $4 = '\\0'") self.expect("p \"hello\"", - substrs = ['(const char [6]) $', 'hello', - '(const char) [0] = \'h\'', - '(const char) [5] = \'\\0\'']) + substrs = ['[6]) $', 'hello', + '[0] = \'h\'', + '[5] = \'\\0\'']) self.expect("p (char*)\"hello\"", substrs = ['(char *) $', ' = 0x', |