Skip to content

Commit 3348866

Browse files
authored
[lldb] Restore deleted call to ThreadPlanStackMap::SetTID (#4996)
This call to `ThreadPlanStack::SetTID` seems to have been unintentionally deleted in #3172. This call sets the TID of all thread plans in the stack, and must be called before calling `Activate`. This resulted in downstream misbehavior, one example of which is in `ThreadPlanStackMap::Update` where a base plan was being queued multiple times on to the same plan stack because the TID wasn't correct. https://github.com/apple/llvm-project/blob/be3823b722c461f7c11f81601e33a3e53ea76565/lldb/source/Target/ThreadPlanStack.cpp#L418-L422 rdar://96534399 (cherry-picked from commit 24f4737)
1 parent 50cf9ae commit 3348866

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lldb/source/Target/Process.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ ThreadPlanSP Process::DoesStackExplainStopNoLock(ThreadPlanStack &stack,
13531353
ThreadPlanSP plan_sp = stack.GetCurrentPlan();
13541354
plan_sp->SetTID(thread.GetID());
13551355
if (plan_sp->DoPlanExplainsStop(event_ptr)) {
1356+
stack.SetTID(thread.GetID());
13561357
m_thread_plans.Activate(stack);
13571358
return plan_sp;
13581359
}

0 commit comments

Comments
 (0)