diff options
author | Jim Ingham <jingham@apple.com> | 2016-04-12 17:17:35 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-04-12 17:17:35 +0000 |
commit | ff7ac6a7b979833bd03a07261cc783d3b363c441 (patch) | |
tree | 126e81e65d061abb63409431bc9dbd0f7210cb82 /lldb/packages/Python/lldbsuite/test | |
parent | 5e2b489049c9856a9b44493b3831b238f52abf79 (diff) | |
download | bcm5719-llvm-ff7ac6a7b979833bd03a07261cc783d3b363c441.tar.gz bcm5719-llvm-ff7ac6a7b979833bd03a07261cc783d3b363c441.zip |
Breakpoint conditions were making result variables, which they should not do.
The result variables aren't useful, and if you have a breakpoint on a
common function you can generate a lot of these. So I changed the
code that checks the condition to set ResultVariableIsInternal in the
EvaluateExpressionOptions that we pass to the execution.
Unfortunately, the check for this variable was done in the wrong place
(the static UserExpression::Evaluate) which is not how breakpoint
conditions execute expressions (UserExpression::Execute). So I moved
the check to UserExpression::Execute (which Evaluate also calls) and made the
overridden method DoExecute.
llvm-svn: 266093
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py index ac2d021482b..c0e5343f3b3 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py @@ -179,4 +179,8 @@ class BreakpointConditionsTestCase(TestBase): # The hit count for the breakpoint should be 1. self.assertTrue(breakpoint.GetHitCount() == 1) + # Test that the condition expression didn't create a result variable: + options = lldb.SBExpressionOptions() + value = frame0.EvaluateExpression("$0", options) + self.assertTrue(value.GetError().Fail(), "Conditions should not make result variables.") process.Continue() |