Deprecated old forms of SBTarget::Launch. There is not just one and no
SWIG renaming done to work around deprecated APIs.
llvm-svn: 124075
diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h
index 32858c5..b4a2fae 100644
--- a/lldb/include/lldb/API/SBTarget.h
+++ b/lldb/include/lldb/API/SBTarget.h
@@ -55,33 +55,6 @@
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 f6c01cf..13d2277 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -116,49 +116,6 @@
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 8128c2e..4f523bd 100644
--- a/lldb/test/array_types/TestArrayTypes.py
+++ b/lldb/test/array_types/TestArrayTypes.py
@@ -110,7 +110,8 @@
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 dc736b5..3f2fc4e 100644
--- a/lldb/test/bitfields/TestBitfields.py
+++ b/lldb/test/bitfields/TestBitfields.py
@@ -94,7 +94,8 @@
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 42231ca..80255a2 100644
--- a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
+++ b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
@@ -139,7 +139,8 @@
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 9e693dc..7f3468f 100644
--- a/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
+++ b/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
@@ -101,7 +101,8 @@
"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 0d3898d..c879259 100644
--- a/lldb/test/class_static/TestStaticVariables.py
+++ b/lldb/test/class_static/TestStaticVariables.py
@@ -80,7 +80,8 @@
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 6fb6b21..c6c302e 100644
--- a/lldb/test/class_types/TestClassTypes.py
+++ b/lldb/test/class_types/TestClassTypes.py
@@ -119,12 +119,12 @@
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 b0dcd27..4689dd8 100644
--- a/lldb/test/conditional_break/TestConditionalBreak.py
+++ b/lldb/test/conditional_break/TestConditionalBreak.py
@@ -52,10 +52,10 @@
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 dfc10d4..2b4bb49 100644
--- a/lldb/test/expression_command/test/TestExprs.py
+++ b/lldb/test/expression_command/test/TestExprs.py
@@ -100,10 +100,10 @@
# 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 453cc66..a8d4325 100644
--- a/lldb/test/foundation/TestObjCMethods.py
+++ b/lldb/test/foundation/TestObjCMethods.py
@@ -212,7 +212,8 @@
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 48d268e..3477d9c 100644
--- a/lldb/test/foundation/TestSymbolTable.py
+++ b/lldb/test/foundation/TestSymbolTable.py
@@ -45,7 +45,8 @@
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 478139c..7b496be 100644
--- a/lldb/test/hello_world/TestHelloWorld.py
+++ b/lldb/test/hello_world/TestHelloWorld.py
@@ -49,10 +49,11 @@
"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 8fe5297..032ca73 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -816,7 +816,7 @@
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 291735f..6280552 100644
--- a/lldb/test/objc-stepping/TestObjCStepping.py
+++ b/lldb/test/objc-stepping/TestObjCStepping.py
@@ -64,7 +64,8 @@
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 0c43783..bb59b2f 100644
--- a/lldb/test/python_api/event/TestEvents.py
+++ b/lldb/test/python_api/event/TestEvents.py
@@ -60,7 +60,8 @@
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 @@
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 d0aedfa..bd64a4a 100644
--- a/lldb/test/python_api/frame/TestFrames.py
+++ b/lldb/test/python_api/frame/TestFrames.py
@@ -44,7 +44,8 @@
# 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 6cadc55..357387f 100644
--- a/lldb/test/python_api/symbol-context/TestSymbolContext.py
+++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py
@@ -47,7 +47,8 @@
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 bd51ed5..7c0425f 100644
--- a/lldb/test/source-manager/TestSourceManager.py
+++ b/lldb/test/source-manager/TestSourceManager.py
@@ -43,7 +43,8 @@
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 5592950..4dbea69 100644
--- a/lldb/test/threads/TestPrintStackTraces.py
+++ b/lldb/test/threads/TestPrintStackTraces.py
@@ -35,7 +35,7 @@
# 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")