[Lldb-commits] [lldb] r122316 - /lldb/trunk/test/python_api/event/TestEvents.py

Johnny Chen johnny.chen at apple.com
Mon Dec 20 21:43:37 PST 2010


Author: johnny
Date: Mon Dec 20 23:43:37 2010
New Revision: 122316

URL: http://llvm.org/viewvc/llvm-project?rev=122316&view=rev
Log:
Set the debugger to asynchronous mode before using the Python API call to kill
the process.  The custom thread started before this point is running in a loop
waiting for events to come.

Modified:
    lldb/trunk/test/python_api/event/TestEvents.py

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=122316&r1=122315&r2=122316&view=diff
==============================================================================
--- lldb/trunk/test/python_api/event/TestEvents.py (original)
+++ lldb/trunk/test/python_api/event/TestEvents.py Mon Dec 20 23:43:37 2010
@@ -85,11 +85,20 @@
         my_thread = MyListeningThread()
         my_thread.start()
 
-        # Use Python API to continue the process.  The listening thread should be
+        # Set the debugger to be in asynchronous mode since our listening thread
+        # is waiting for events to come.
+        self.dbg.SetAsync(True)
+
+        # Use Python API to kill the process.  The listening thread should be
         # able to receive a state changed event.
-        self.process.Continue()
+        self.process.Kill()
 
+        # Wait until the 'MyListeningThread' terminates.
         my_thread.join()
+
+        # Restore the original synchronous mode.
+        self.dbg.SetAsync(False)
+
         self.assertTrue(event.IsValid())
 
         





More information about the lldb-commits mailing list