summaryrefslogtreecommitdiffstats
path: root/lldb/utils/vim-lldb/python-vim-lldb
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-05-28 21:27:03 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-05-28 21:27:03 +0000
commitbb43721a35c962ccaedcec2f86dfcefb2ad7ee43 (patch)
treee5a6fd398c5dad28128707533e429267d43b5081 /lldb/utils/vim-lldb/python-vim-lldb
parent8a1aa518a3d6503b12804f023b8ffd8478a735c6 (diff)
downloadbcm5719-llvm-bb43721a35c962ccaedcec2f86dfcefb2ad7ee43.tar.gz
bcm5719-llvm-bb43721a35c962ccaedcec2f86dfcefb2ad7ee43.zip
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! llvm-svn: 182806
Diffstat (limited to 'lldb/utils/vim-lldb/python-vim-lldb')
-rw-r--r--lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py b/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py
index 04e11a5a93e..923e771e6af 100644
--- a/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py
+++ b/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py
@@ -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
OpenPOWER on IntegriCloud