diff options
author | Sean Callanan <scallanan@apple.com> | 2013-05-22 22:49:06 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2013-05-22 22:49:06 +0000 |
commit | fbf5c682cbfce539bba2de06456cd6afcf8c892f (patch) | |
tree | 64969f94fd7116f6d881f896bddc219f83c12036 /lldb/test/expression_command/persistent_variables/TestPersistentVariables.py | |
parent | 682ae15bb92fb05a2fbb7b58a550adffb8538137 (diff) | |
download | bcm5719-llvm-fbf5c682cbfce539bba2de06456cd6afcf8c892f.tar.gz bcm5719-llvm-fbf5c682cbfce539bba2de06456cd6afcf8c892f.zip |
Fixed a bug where persistent variables did not
live as long as they needed to. This led to
equality tests involving persistent variables
often failing or succeeding when they had no
business doing so.
To do this, I introduced the ability for a
memory allocation to "leak" - that is, to
persist in the process beyond the lifetime of
the expression. Hand-declared persistent
variables do this now.
<rdar://problem/13956311>
llvm-svn: 182528
Diffstat (limited to 'lldb/test/expression_command/persistent_variables/TestPersistentVariables.py')
-rw-r--r-- | lldb/test/expression_command/persistent_variables/TestPersistentVariables.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py b/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py index 47d1631d7c2..51c22aa9c52 100644 --- a/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py +++ b/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py @@ -17,28 +17,33 @@ class PersistentVariablesTestCase(TestBase): self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.runCmd("breakpoint set --name main") + self.runCmd("breakpoint set --source-pattern-regexp break") self.runCmd("run", RUN_SUCCEEDED) - self.expect("expression int $i = 5; $i + 1", - startstr = "(int) $0 = 6") + self.runCmd("expression int $i = i") + + self.expect("expression $i == i", + startstr = "(bool) $0 = true") + + self.expect("expression $i + 1", + startstr = "(int) $1 = 6") # (int) $0 = 6 self.expect("expression $i + 3", - startstr = "(int) $1 = 8") + startstr = "(int) $2 = 8") # (int) $1 = 8 - self.expect("expression $1 + $0", - startstr = "(int) $2 = 14") + self.expect("expression $2 + $1", + startstr = "(int) $3 = 14") # (int) $2 = 14 - self.expect("expression $2", - startstr = "(int) $2 = 14") + self.expect("expression $3", + startstr = "(int) $3 = 14") # (int) $2 = 14 - self.expect("expression $1", - startstr = "(int) $1 = 8") + self.expect("expression $2", + startstr = "(int) $2 = 8") # (int) $1 = 8 |