Modify test scripts to accomodate SBTarget.Launch() API change.

llvm-svn: 124828
diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py
index 4f523bd..5907480 100644
--- a/lldb/test/array_types/TestArrayTypes.py
+++ b/lldb/test/array_types/TestArrayTypes.py
@@ -111,7 +111,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 3f2fc4e..9396b89 100644
--- a/lldb/test/bitfields/TestBitfields.py
+++ b/lldb/test/bitfields/TestBitfields.py
@@ -95,7 +95,7 @@
         self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
 
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 80255a2..b168c81 100644
--- a/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
+++ b/lldb/test/breakpoint_conditions/TestBreakpointConditions.py
@@ -140,7 +140,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 7f3468f..c3b9405 100644
--- a/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
+++ b/lldb/test/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
@@ -102,7 +102,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 c879259..4e412ec 100644
--- a/lldb/test/class_static/TestStaticVariables.py
+++ b/lldb/test/class_static/TestStaticVariables.py
@@ -81,7 +81,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 c6c302e..c52f732 100644
--- a/lldb/test/class_types/TestClassTypes.py
+++ b/lldb/test/class_types/TestClassTypes.py
@@ -120,7 +120,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
         #self.breakAfterLaunch(self.process, "C::C(int, int, int)")
 
         if not error.Success() or not self.process.IsValid():
diff --git a/lldb/test/conditional_break/TestConditionalBreak.py b/lldb/test/conditional_break/TestConditionalBreak.py
index 4689dd8..67ded56 100644
--- a/lldb/test/conditional_break/TestConditionalBreak.py
+++ b/lldb/test/conditional_break/TestConditionalBreak.py
@@ -53,7 +53,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
 
         self.assertTrue(error.Success() and self.process.IsValid(), PROCESS_IS_VALID)
 
diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py
index 2b4bb49..33d1e39 100644
--- a/lldb/test/expression_command/test/TestExprs.py
+++ b/lldb/test/expression_command/test/TestExprs.py
@@ -101,7 +101,7 @@
         # Launch the process, and do not stop at the entry point.
         # Pass 'X Y Z' as the args, which makes argc == 4.
         error = lldb.SBError()
-        self.process = target.Launch(['X', 'Y', 'Z'], None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch(self.dbg.GetListener(), ['X', 'Y', 'Z'], None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
 
         if not error.Success() or not self.process.IsValid():
             self.fail("SBTarget.LaunchProcess() failed")
diff --git a/lldb/test/foundation/TestObjCMethods.py b/lldb/test/foundation/TestObjCMethods.py
index a8d4325..b8415fe 100644
--- a/lldb/test/foundation/TestObjCMethods.py
+++ b/lldb/test/foundation/TestObjCMethods.py
@@ -213,7 +213,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 3477d9c..2befe2c 100644
--- a/lldb/test/foundation/TestSymbolTable.py
+++ b/lldb/test/foundation/TestSymbolTable.py
@@ -46,7 +46,7 @@
 
         # Launch the process, and do not stop at the entry point.
         error = lldb.SBError()
-        process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        process = target.Launch (self.dbg.GetListener(), 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 7b496be..b3ce2d5 100644
--- a/lldb/test/hello_world/TestHelloWorld.py
+++ b/lldb/test/hello_world/TestHelloWorld.py
@@ -53,7 +53,7 @@
 
         if useLaunchAPI:
             error = lldb.SBError()
-            process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+            process = target.Launch (self.dbg.GetListener(), 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/objc-stepping/TestObjCStepping.py b/lldb/test/objc-stepping/TestObjCStepping.py
index 6280552..89fba27 100644
--- a/lldb/test/objc-stepping/TestObjCStepping.py
+++ b/lldb/test/objc-stepping/TestObjCStepping.py
@@ -65,7 +65,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 bb59b2f..624cb0c 100644
--- a/lldb/test/python_api/event/TestEvents.py
+++ b/lldb/test/python_api/event/TestEvents.py
@@ -59,9 +59,12 @@
                         breakpoint.GetNumLocations() == 1,
                         VALID_BREAKPOINT)
 
+        # Get the debugger listener.
+        listener = self.dbg.GetListener()
+
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (listener, None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
 
         self.process = target.GetProcess()
         self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
@@ -74,9 +77,6 @@
         event = lldb.SBEvent()
         self.assertFalse(event.IsValid(), "Event should not be valid initially")
 
-        # Get the debugger listener.
-        listener = self.dbg.GetListener()
-
         # Create MyListeningThread to wait for any kind of event.
         import threading
         class MyListeningThread(threading.Thread):
@@ -123,7 +123,7 @@
 
         # Now launch the process, and do not stop at the entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 bd64a4a..908a049 100644
--- a/lldb/test/python_api/frame/TestFrames.py
+++ b/lldb/test/python_api/frame/TestFrames.py
@@ -45,7 +45,7 @@
         # 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().
         error = lldb.SBError()
-        process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        process = target.Launch (self.dbg.GetListener(), 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 357387f..96d8356 100644
--- a/lldb/test/python_api/symbol-context/TestSymbolContext.py
+++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py
@@ -48,7 +48,7 @@
 
         # Now launch the process, and do not stop at entry point.
         error = lldb.SBError()
-        self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        self.process = target.Launch (self.dbg.GetListener(), 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 7c0425f..a41c7a3 100644
--- a/lldb/test/source-manager/TestSourceManager.py
+++ b/lldb/test/source-manager/TestSourceManager.py
@@ -44,7 +44,7 @@
 
         # Launch the process, and do not stop at the entry point.
         error = lldb.SBError()
-        process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+        process = target.Launch (self.dbg.GetListener(), 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 ec551ff..a2895ff 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 (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, rc)
+        self.process = target.Launch (self.dbg.GetListener(), 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")