[Lldb-commits] [lldb] r124075 - in /lldb/trunk: include/lldb/API/ source/API/ test/ test/array_types/ test/bitfields/ test/breakpoint_conditions/ test/breakpoint_ignore_count/ test/class_static/ test/class_types/ test/conditional_break/ test/expression_command/test/ test/foundation/ test/hello_world/ test/objc-stepping/ test/python_api/event/ test/python_api/frame/ test/python_api/symbol-context/ test/source-manager/ test/threads/

Greg Clayton gclayton at apple.com
Sun Jan 23 09:46:23 PST 2011


Author: gclayton
Date: Sun Jan 23 11:46:22 2011
New Revision: 124075

URL: http://llvm.org/viewvc/llvm-project?rev=124075&view=rev
Log:
Deprecated old forms of SBTarget::Launch. There is not just one and no
SWIG renaming done to work around deprecated APIs.


Modified:
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/test/array_types/TestArrayTypes.py
    lldb/trunk/test/bitfields/TestBitfields.py
    lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py
    lldb/trunk/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
    lldb/trunk/test/class_static/TestStaticVariables.py
    lldb/trunk/test/class_types/TestClassTypes.py
    lldb/trunk/test/conditional_break/TestConditionalBreak.py
    lldb/trunk/test/expression_command/test/TestExprs.py
    lldb/trunk/test/foundation/TestObjCMethods.py
    lldb/trunk/test/foundation/TestSymbolTable.py
    lldb/trunk/test/hello_world/TestHelloWorld.py
    lldb/trunk/test/lldbtest.py
    lldb/trunk/test/objc-stepping/TestObjCStepping.py
    lldb/trunk/test/python_api/event/TestEvents.py
    lldb/trunk/test/python_api/frame/TestFrames.py
    lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py
    lldb/trunk/test/source-manager/TestSourceManager.py
    lldb/trunk/test/threads/TestPrintStackTraces.py

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Sun Jan 23 11:46:22 2011
@@ -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,

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Sun Jan 23 11:46:22 2011
@@ -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 

Modified: lldb/trunk/test/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/TestArrayTypes.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/array_types/TestArrayTypes.py Sun Jan 23 11:46:22 2011
@@ -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)

Modified: lldb/trunk/test/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/bitfields/TestBitfields.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/bitfields/TestBitfields.py Sun Jan 23 11:46:22 2011
@@ -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.

Modified: lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py (original)
+++ lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py Sun Jan 23 11:46:22 2011
@@ -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)

Modified: lldb/trunk/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py (original)
+++ lldb/trunk/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py Sun Jan 23 11:46:22 2011
@@ -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)

Modified: lldb/trunk/test/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_static/TestStaticVariables.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/class_static/TestStaticVariables.py Sun Jan 23 11:46:22 2011
@@ -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)

Modified: lldb/trunk/test/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypes.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/class_types/TestClassTypes.py Sun Jan 23 11:46:22 2011
@@ -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, "

Modified: lldb/trunk/test/conditional_break/TestConditionalBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/conditional_break/TestConditionalBreak.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/conditional_break/TestConditionalBreak.py (original)
+++ lldb/trunk/test/conditional_break/TestConditionalBreak.py Sun Jan 23 11:46:22 2011
@@ -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,

Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Sun Jan 23 11:46:22 2011
@@ -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:

Modified: lldb/trunk/test/foundation/TestObjCMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/foundation/TestObjCMethods.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/foundation/TestObjCMethods.py (original)
+++ lldb/trunk/test/foundation/TestObjCMethods.py Sun Jan 23 11:46:22 2011
@@ -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)
 

Modified: lldb/trunk/test/foundation/TestSymbolTable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/foundation/TestSymbolTable.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/foundation/TestSymbolTable.py (original)
+++ lldb/trunk/test/foundation/TestSymbolTable.py Sun Jan 23 11:46:22 2011
@@ -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.

Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Sun Jan 23 11:46:22 2011
@@ -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".

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Sun Jan 23 11:46:22 2011
@@ -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.
         """

Modified: lldb/trunk/test/objc-stepping/TestObjCStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/objc-stepping/TestObjCStepping.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/objc-stepping/TestObjCStepping.py (original)
+++ lldb/trunk/test/objc-stepping/TestObjCStepping.py Sun Jan 23 11:46:22 2011
@@ -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)
 

Modified: lldb/trunk/test/python_api/event/TestEvents.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/event/TestEvents.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/python_api/event/TestEvents.py (original)
+++ lldb/trunk/test/python_api/event/TestEvents.py Sun Jan 23 11:46:22 2011
@@ -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,

Modified: lldb/trunk/test/python_api/frame/TestFrames.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/frame/TestFrames.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/python_api/frame/TestFrames.py (original)
+++ lldb/trunk/test/python_api/frame/TestFrames.py Sun Jan 23 11:46:22 2011
@@ -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,

Modified: lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py (original)
+++ lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py Sun Jan 23 11:46:22 2011
@@ -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)

Modified: lldb/trunk/test/source-manager/TestSourceManager.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/source-manager/TestSourceManager.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/source-manager/TestSourceManager.py (original)
+++ lldb/trunk/test/source-manager/TestSourceManager.py Sun Jan 23 11:46:22 2011
@@ -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.

Modified: lldb/trunk/test/threads/TestPrintStackTraces.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/threads/TestPrintStackTraces.py?rev=124075&r1=124074&r2=124075&view=diff
==============================================================================
--- lldb/trunk/test/threads/TestPrintStackTraces.py (original)
+++ lldb/trunk/test/threads/TestPrintStackTraces.py Sun Jan 23 11:46:22 2011
@@ -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")





More information about the lldb-commits mailing list