mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 18:12:44 +00:00
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
This commit is contained in:
parent
8a1aa518a3
commit
bb43721a35
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user