Pass an SBStructuredData to scripted ThreadPlans on use.
This will allow us to write reusable scripted ThreadPlans, since you can use key/value pairs with known keys in the plan to parametrize its behavior. Differential Revision: https://reviews.llvm.org/D68366 llvm-svn: 373675
This commit is contained in:
@@ -25,10 +25,11 @@ using namespace lldb_private;
|
||||
|
||||
// ThreadPlanPython
|
||||
|
||||
ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name)
|
||||
ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name,
|
||||
StructuredDataImpl *args_data)
|
||||
: ThreadPlan(ThreadPlan::eKindPython, "Python based Thread Plan", thread,
|
||||
eVoteNoOpinion, eVoteNoOpinion),
|
||||
m_class_name(class_name), m_did_push(false) {
|
||||
m_class_name(class_name), m_args_data(args_data), m_did_push(false) {
|
||||
SetIsMasterPlan(true);
|
||||
SetOkayToDiscard(true);
|
||||
SetPrivate(false);
|
||||
@@ -65,7 +66,8 @@ void ThreadPlanPython::DidPush() {
|
||||
.GetScriptInterpreter();
|
||||
if (script_interp) {
|
||||
m_implementation_sp = script_interp->CreateScriptedThreadPlan(
|
||||
m_class_name.c_str(), m_error_str, this->shared_from_this());
|
||||
m_class_name.c_str(), m_args_data, m_error_str,
|
||||
this->shared_from_this());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user