ThreadList::ExpressionExecutionThreadPusher::ExpressionExecutionThreadPusher( lldb::ThreadSP thread_sp) : m_thread_list(nullptr), m_tid(LLDB_INVALID_THREAD_ID) { if (thread_sp) { m_tid = thread_sp->GetID(); m_thread_list = &thread_sp->GetProcess()->GetThreadList(); m_thread_list->PushExpressionExecutionThread(m_tid); } }
void ExecutionContextRef::SetThreadSP (const lldb::ThreadSP &thread_sp) { if (thread_sp) { m_thread_wp = thread_sp; m_tid = thread_sp->GetID(); SetProcessSP (thread_sp->GetProcess()); } else { ClearThread(); m_process_wp.reset(); m_target_wp.reset(); } }
void ExecutionContext::SetContext (const lldb::ThreadSP &thread_sp) { m_frame_sp.reset(); m_thread_sp = thread_sp; if (thread_sp) { m_process_sp = thread_sp->GetProcess(); if (m_process_sp) m_target_sp = m_process_sp->GetTarget().shared_from_this(); else m_target_sp.reset(); } else { m_target_sp.reset(); m_process_sp.reset(); } }