Thread Plans pushed by a scripted plan should be private plans.
If a plan is not private, "thread plan discard" can discard it. It would not be hard to write reliable scripted plan if its subplans could get removed out from under it.
This commit is contained in:
@@ -237,7 +237,9 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange(
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
return LLDB_RECORD_RESULT(SBThreadPlan());
|
||||
@@ -281,6 +283,8 @@ SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address,
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
@@ -321,6 +325,8 @@ SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
@@ -356,6 +362,8 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address,
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
@@ -390,6 +398,8 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
@@ -415,6 +425,8 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
|
||||
|
||||
if (plan_status.Fail())
|
||||
error.SetErrorString(plan_status.AsCString());
|
||||
else
|
||||
plan.m_opaque_sp->SetPrivate(true);
|
||||
|
||||
return LLDB_RECORD_RESULT(plan);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user