diff options
author | Jim Ingham <jingham@apple.com> | 2017-07-06 18:06:25 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2017-07-06 18:06:25 +0000 |
commit | 19c28eee46a5d6b13a7f8c5096c6efc1f603578c (patch) | |
tree | be45f6a1807d338038614c4f11550c60afdd73f0 /lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py | |
parent | c855615831d77ae8ca94df757a3f2cf605cb3e9f (diff) | |
download | bcm5719-llvm-19c28eee46a5d6b13a7f8c5096c6efc1f603578c.tar.gz bcm5719-llvm-19c28eee46a5d6b13a7f8c5096c6efc1f603578c.zip |
Working through testcases, converting to run_to_source_breakpoint.
llvm-svn: 307287
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py b/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py index 70b862bf486..817f6cb3944 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py @@ -30,32 +30,8 @@ class TestMacros(TestBase): src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "Main source file") - # Get the path of the executable - cwd = os.getcwd() - exe_file = "a.out" - exe_path = os.path.join(cwd, exe_file) - - # Load the executable - target = self.dbg.CreateTarget(exe_path) - self.assertTrue(target.IsValid(), VALID_TARGET) - - # Set breakpoints - bp1 = target.BreakpointCreateBySourceRegex("Break here", src_file_spec) - self.assertTrue( - bp1.IsValid() and bp1.GetNumLocations() >= 1, - VALID_BREAKPOINT) - - # Launch the process - process = target.LaunchSimple( - None, None, self.get_process_working_directory()) - self.assertTrue(process.IsValid(), PROCESS_IS_VALID) - - # Get the thread of the process - self.assertTrue( - process.GetState() == lldb.eStateStopped, - PROCESS_STOPPED) - thread = lldbutil.get_stopped_thread( - process, lldb.eStopReasonBreakpoint) + (target, process, thread, bp1) = lldbutil.run_to_source_breakpoint( + self, "Break here", src_file_spec) # Get frame for current thread frame = thread.GetSelectedFrame() |