[Lldb-commits] [lldb] r182806 - Fixed continue issues with process attach/detach

Daniel Malea daniel.malea at intel.com
Tue May 28 14:27:03 PDT 2013


Author: dmalea
Date: Tue May 28 16:27:03 2013
New Revision: 182806

URL: http://llvm.org/viewvc/llvm-project?rev=182806&view=rev
Log:
Fixed continue issues with process attach/detach
- added code for tracking transition from eStateAttaching to eStateStopped in event listener and handling process continuation there.

Patch by Arthur Evstifeev!


Modified:
    lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py

Modified: lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py?rev=182806&r1=182805&r2=182806&view=diff
==============================================================================
--- lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py (original)
+++ lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py Tue May 28 16:27:03 2013
@@ -153,11 +153,7 @@ class LLDBController(object):
       return
 
     self.ui.activate()
-
-    # attach succeeded, store pid and add some event listeners
     self.pid = self.process.GetProcessID()
-    self.process.GetBroadcaster().AddListener(self.processListener, lldb.SBProcess.eBroadcastBitStateChanged)
-    self.doContinue()
 
     print "Attached to %s (pid=%d)" % (process_name, self.pid)
 
@@ -352,6 +348,10 @@ class LLDBController(object):
             self.processListener.GetNextEvent(event)
             new_state = lldb.SBProcess.GetStateFromEvent(event)
 
+            # continue if stopped after attaching
+            if old_state == lldb.eStateAttaching and new_state == lldb.eStateStopped:
+              self.process.Continue()
+
             # If needed, perform any event-specific behaviour here
             num_events_handled += 1
 





More information about the lldb-commits mailing list