mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 20:15:49 -04:00

Summary: This patch extends the `SBThreadPlan` to allow retrieving of thread plans for scripted steps. Reviewers: labath, zturner, jingham Reviewed By: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53361 llvm-svn: 345247
38 lines
1000 B
Python
38 lines
1000 B
Python
import lldb
|
|
|
|
class StepWithChild:
|
|
def __init__(self, thread_plan):
|
|
self.thread_plan = thread_plan
|
|
self.child_thread_plan = self.queue_child_thread_plan()
|
|
|
|
def explains_stop(self, event):
|
|
return False
|
|
|
|
def should_stop(self, event):
|
|
if not self.child_thread_plan.IsPlanComplete():
|
|
return False
|
|
|
|
self.thread_plan.SetPlanComplete(True)
|
|
|
|
return True
|
|
|
|
def should_step(self):
|
|
return False
|
|
|
|
def queue_child_thread_plan(self):
|
|
return None
|
|
|
|
class StepOut(StepWithChild):
|
|
def __init__(self, thread_plan, dict):
|
|
StepWithChild.__init__(self, thread_plan)
|
|
|
|
def queue_child_thread_plan(self):
|
|
return self.thread_plan.QueueThreadPlanForStepOut(0)
|
|
|
|
class StepScripted(StepWithChild):
|
|
def __init__(self, thread_plan, dict):
|
|
StepWithChild.__init__(self, thread_plan)
|
|
|
|
def queue_child_thread_plan(self):
|
|
return self.thread_plan.QueueThreadPlanForStepScripted("Steps.StepOut")
|