diff options
Diffstat (limited to 'lldb')
20 files changed, 41 insertions, 97 deletions
diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h index 32858c503f3..b4a2fae1691 100644 --- a/lldb/include/lldb/API/SBTarget.h +++ b/lldb/include/lldb/API/SBTarget.h @@ -55,33 +55,6 @@ public: GetProcess (); lldb::SBProcess - LaunchProcess (char const **argv, - char const **envp, - const char *tty, - uint32_t launch_flags, // See LaunchFlags - bool stop_at_entry); - - lldb::SBProcess - Launch (char const **argv, - char const **envp, - const char *tty, - uint32_t launch_flags, // See LaunchFlags - bool stop_at_entry, - lldb::SBError& error); - -#ifdef SWIG -%rename(LaunchWithCWD) Launch (char const **argv, - char const **envp, - const char *stdin_path, - const char *stdout_path, - const char *stderr_path, - const char *working_directory, - uint32_t launch_flags, // See LaunchFlags - bool stop_at_entry, - lldb::SBError& error); -#endif - - lldb::SBProcess Launch (char const **argv, char const **envp, const char *stdin_path, diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index f6c01cf0a87..13d227700bd 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -116,49 +116,6 @@ SBTarget::GetDebugger () const return debugger; } -SBProcess -SBTarget::LaunchProcess -( - char const **argv, - char const **envp, - const char *tty, - uint32_t launch_flags, - bool stop_at_entry -) -{ - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - - if (log) - log->Printf ("SBTarget(%p)::LaunchProcess (argv=%p, envp=%p, tty=\"%s\", launch_flags=%d, stop_at_entry=%i)", - m_opaque_sp.get(), argv, envp, tty, launch_flags, stop_at_entry); - - SBError sb_error; - SBProcess sb_process = Launch (argv, envp, tty, tty, tty, NULL, launch_flags, stop_at_entry, sb_error); - - log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - { - log->Printf ("SBTarget(%p)::LaunchProcess (...) => SBProcess(%p)", - m_opaque_sp.get(), sb_process.get()); - } - - return sb_process; -} - - -SBProcess -SBTarget::Launch -( - char const **argv, - char const **envp, - const char *tty, - uint32_t launch_flags, - bool stop_at_entry, - SBError &error -) -{ - return Launch (argv, envp, tty, tty, tty, NULL, launch_flags, stop_at_entry, error); -} SBProcess SBTarget::Launch diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py index 8128c2e550c..4f523bda40d 100644 --- a/lldb/test/array_types/TestArrayTypes.py +++ b/lldb/test/array_types/TestArrayTypes.py @@ -110,7 +110,8 @@ class ArrayTypesTestCase(TestBase): substrs = ["resolved = 1"]) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/bitfields/TestBitfields.py b/lldb/test/bitfields/TestBitfields.py index dc736b5207c..3f2fc4ed1c3 100644 --- a/lldb/test/bitfields/TestBitfields.py +++ b/lldb/test/bitfields/TestBitfields.py @@ -94,7 +94,8 @@ class BitfieldsTestCase(TestBase): breakpoint = target.BreakpointCreateByLocation("main.c", self.line) self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT) - self.process = target.LaunchProcess([], [], os.ctermid(), False, 0) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. diff --git a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py index 42231cab9a6..80255a221f1 100644 --- a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py +++ b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py @@ -139,7 +139,8 @@ class BreakpointConditionsTestCase(TestBase): startstr = 'val == 3') # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py index 9e693dc7ad4..7f3468f7828 100644 --- a/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py +++ b/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py @@ -101,7 +101,8 @@ class BreakpointIgnoreCountTestCase(TestBase): "SetIgnoreCount() works correctly") # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/class_static/TestStaticVariables.py b/lldb/test/class_static/TestStaticVariables.py index 0d3898d6ab0..c8792594fda 100644 --- a/lldb/test/class_static/TestStaticVariables.py +++ b/lldb/test/class_static/TestStaticVariables.py @@ -80,7 +80,8 @@ class StaticVariableTestCase(TestBase): self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/class_types/TestClassTypes.py b/lldb/test/class_types/TestClassTypes.py index 6fb6b2105ca..c6c302ea13d 100644 --- a/lldb/test/class_types/TestClassTypes.py +++ b/lldb/test/class_types/TestClassTypes.py @@ -119,12 +119,12 @@ class ClassTypesTestCase(TestBase): str(self.line)]) # Now launch the process, and do not stop at entry point. - rc = lldb.SBError() - self.process = target.Launch([], [], os.ctermid(), 0, False, rc) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) #self.breakAfterLaunch(self.process, "C::C(int, int, int)") - if not rc.Success() or not self.process.IsValid(): - self.fail("SBTarget.LaunchProcess() failed") + if not error.Success() or not self.process.IsValid(): + self.fail("SBTarget.Launch() failed") if self.process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " diff --git a/lldb/test/conditional_break/TestConditionalBreak.py b/lldb/test/conditional_break/TestConditionalBreak.py index b0dcd27fe73..4689dd890e3 100644 --- a/lldb/test/conditional_break/TestConditionalBreak.py +++ b/lldb/test/conditional_break/TestConditionalBreak.py @@ -52,10 +52,10 @@ class ConditionalBreakTestCase(TestBase): self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - rc = lldb.SBError() - self.process = target.Launch([], [], os.ctermid(), 0, False, rc) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) - self.assertTrue(rc.Success() and self.process.IsValid(), PROCESS_IS_VALID) + self.assertTrue(error.Success() and self.process.IsValid(), PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. self.assertTrue(self.process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py index dfc10d4edce..2b4bb496824 100644 --- a/lldb/test/expression_command/test/TestExprs.py +++ b/lldb/test/expression_command/test/TestExprs.py @@ -100,10 +100,10 @@ class BasicExprCommandsTestCase(TestBase): # Launch the process, and do not stop at the entry point. # Pass 'X Y Z' as the args, which makes argc == 4. - rc = lldb.SBError() - self.process = target.Launch(['X', 'Y', 'Z'], [], os.ctermid(), 0, False, rc) + error = lldb.SBError() + self.process = target.Launch(['X', 'Y', 'Z'], None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) - if not rc.Success() or not self.process.IsValid(): + if not error.Success() or not self.process.IsValid(): self.fail("SBTarget.LaunchProcess() failed") if self.process.GetState() != lldb.eStateStopped: diff --git a/lldb/test/foundation/TestObjCMethods.py b/lldb/test/foundation/TestObjCMethods.py index 453cc66661c..a8d432524a7 100644 --- a/lldb/test/foundation/TestObjCMethods.py +++ b/lldb/test/foundation/TestObjCMethods.py @@ -212,7 +212,8 @@ class FoundationTestCase(TestBase): self.assertTrue(break1.IsValid(), VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/foundation/TestSymbolTable.py b/lldb/test/foundation/TestSymbolTable.py index 48d268e1fc0..3477d9c89ec 100644 --- a/lldb/test/foundation/TestSymbolTable.py +++ b/lldb/test/foundation/TestSymbolTable.py @@ -45,7 +45,8 @@ class FoundationSymtabTestCase(TestBase): self.assertTrue(target.IsValid(), VALID_TARGET) # Launch the process, and do not stop at the entry point. - process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) # # Exercise Python APIs to access the symbol table entries. diff --git a/lldb/test/hello_world/TestHelloWorld.py b/lldb/test/hello_world/TestHelloWorld.py index 478139c3f56..7b496be041e 100644 --- a/lldb/test/hello_world/TestHelloWorld.py +++ b/lldb/test/hello_world/TestHelloWorld.py @@ -49,10 +49,11 @@ class HelloWorldTestCase(TestBase): "Breakpoint.SetEnabled(True) works") # rdar://problem/8364687 - # SBTarget.LaunchProcess() issue (or is there some race condition)? + # SBTarget.Launch() issue (or is there some race condition)? if useLaunchAPI: - process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) # The following isn't needed anymore, rdar://8364687 is fixed. # # Apply some dances after LaunchProcess() in order to break at "main". diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 8fe5297416a..032ca73a0f8 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -816,7 +816,7 @@ class TestBase(unittest2.TestCase): def breakAfterLaunch(self, process, func, trace=False): """ - Perform some dancees after LaunchProcess() to break at func name. + Perform some dances after Launch() to break at func name. Return True if we can successfully break at the func name in due time. """ diff --git a/lldb/test/objc-stepping/TestObjCStepping.py b/lldb/test/objc-stepping/TestObjCStepping.py index 291735fb286..62805524251 100644 --- a/lldb/test/objc-stepping/TestObjCStepping.py +++ b/lldb/test/objc-stepping/TestObjCStepping.py @@ -64,7 +64,8 @@ class TestObjCStepping(TestBase): self.assertTrue(break_returnStruct_call_super.IsValid(), VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py index 0c437831aa6..bb59b2ff780 100644 --- a/lldb/test/python_api/event/TestEvents.py +++ b/lldb/test/python_api/event/TestEvents.py @@ -60,7 +60,8 @@ class EventAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) @@ -121,7 +122,8 @@ class EventAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py index d0aedfa5158..bd64a4ac7fc 100644 --- a/lldb/test/python_api/frame/TestFrames.py +++ b/lldb/test/python_api/frame/TestFrames.py @@ -44,7 +44,8 @@ class FrameAPITestCase(TestBase): # Note that we don't assign the process to self.process as in other test # cases. We want the inferior to run till it exits and there's no need # for the testing framework to kill the inferior upon tearDown(). - process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py index 6cadc55de24..357387fe4ca 100644 --- a/lldb/test/python_api/symbol-context/TestSymbolContext.py +++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py @@ -47,7 +47,8 @@ class SymbolContextAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) diff --git a/lldb/test/source-manager/TestSourceManager.py b/lldb/test/source-manager/TestSourceManager.py index bd51ed503b3..7c0425ff9ec 100644 --- a/lldb/test/source-manager/TestSourceManager.py +++ b/lldb/test/source-manager/TestSourceManager.py @@ -43,7 +43,8 @@ class SourceManagerTestCase(TestBase): self.assertTrue(target.IsValid(), VALID_TARGET) # Launch the process, and do not stop at the entry point. - process = target.LaunchProcess([], [], os.ctermid(), 0, False) + error = lldb.SBError() + process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) # # Exercise Python APIs to display source lines. diff --git a/lldb/test/threads/TestPrintStackTraces.py b/lldb/test/threads/TestPrintStackTraces.py index 5592950b776..4dbea69525b 100644 --- a/lldb/test/threads/TestPrintStackTraces.py +++ b/lldb/test/threads/TestPrintStackTraces.py @@ -35,7 +35,7 @@ class ThreadsStackTracesTestCase(TestBase): # Now launch the process, and do not stop at entry point. rc = lldb.SBError() - self.process = target.Launch([], [], os.ctermid(), 0, False, rc) + self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, rc) if not rc.Success() or not self.process.IsValid(): self.fail("SBTarget.LaunchProcess() failed") |

