[Lldb-commits] [lldb] r348250 - [Expr] Fix `TestExprOptions` after r348240 on MacOS X
Aleksandr Urakov via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 4 03:08:02 PST 2018
Author: aleksandr.urakov
Date: Tue Dec 4 03:08:02 2018
New Revision: 348250
URL: http://llvm.org/viewvc/llvm-project?rev=348250&view=rev
Log:
[Expr] Fix `TestExprOptions` after r348240 on MacOS X
Summary:
r348240 assumes that an expression contains the Objective C option if
Objective C Runtime is found. But on MacOS X it seems that the test application
process always contains Objective C Runtime, so the test fails when it assumes
that the language is C++ only. Skip this part on Darwin.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py?rev=348250&r1=348249&r2=348250&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py Tue Dec 4 03:08:02 2018
@@ -14,6 +14,7 @@ import os
import time
import lldb
import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
@@ -64,6 +65,20 @@ class ExprOptionsTestCase(TestBase):
self.assertTrue(val.IsValid())
self.assertFalse(val.GetError().Success())
+ @skipIfDarwin
+ def test_expr_options_lang(self):
+ """These expression language options should work as expected."""
+ self.build()
+
+ # Set debugger into synchronous mode
+ self.dbg.SetAsync(False)
+
+ (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+ self, '// breakpoint_in_main', self.main_source_spec)
+
+ frame = thread.GetFrameAtIndex(0)
+ options = lldb.SBExpressionOptions()
+
# Make sure we can retrieve `id` variable if language is set to C++11:
options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
val = frame.EvaluateExpression('id == 0', options)
More information about the lldb-commits
mailing list