summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-13 19:26:17 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-13 19:26:17 +0000
commite75e363cb71a7339552b9d943e78ac62b737379b (patch)
tree29ec5bd173694acbbcbb8207114ef7ca189436ba /packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
parent1b306c26ade71504511d2fa75b03dfaee77f9620 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py')
-rw-r--r--packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py b/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
index 0d1a17352a3f0..b4e9a8bfeab8b 100644
--- a/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
+++ b/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
@@ -37,25 +37,10 @@ class ExprOptionsTestCase(TestBase):
# Set debugger into synchronous mode
self.dbg.SetAsync(False)
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(self.exe)
- self.assertTrue(target, VALID_TARGET)
+ (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+ self, '// breakpoint_in_main', self.main_source_spec)
- # Set breakpoints inside main.
- breakpoint = target.BreakpointCreateBySourceRegex(
- '// breakpoint_in_main', self.main_source_spec)
- self.assertTrue(breakpoint)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- threads = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint)
- self.assertEqual(len(threads), 1)
-
- frame = threads[0].GetFrameAtIndex(0)
+ frame = thread.GetFrameAtIndex(0)
options = lldb.SBExpressionOptions()
# test --language on C++ expression using the SB API's