本文整理汇总了C++中OperatingSystem::CreateThreadStopReason方法的典型用法代码示例。如果您正苦于以下问题:C++ OperatingSystem::CreateThreadStopReason方法的具体用法?C++ OperatingSystem::CreateThreadStopReason怎么用?C++ OperatingSystem::CreateThreadStopReason使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OperatingSystem
的用法示例。
在下文中一共展示了OperatingSystem::CreateThreadStopReason方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_sp
lldb::StopInfoSP
ThreadMemory::GetPrivateStopReason ()
{
ProcessSP process_sp (GetProcess());
if (process_sp)
{
const uint32_t process_stop_id = process_sp->GetStopID();
if (m_thread_stop_reason_stop_id != process_stop_id ||
(m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
{
// If GetGDBProcess().SetThreadStopInfo() doesn't find a stop reason
// for this thread, then m_actual_stop_info_sp will not ever contain
// a valid stop reason and the "m_actual_stop_info_sp->IsValid() == false"
// check will never be able to tell us if we have the correct stop info
// for this thread and we will continually send qThreadStopInfo packets
// down to the remote GDB server, so we need to keep our own notion
// of the stop ID that m_actual_stop_info_sp is valid for (even if it
// contains nothing). We use m_thread_stop_reason_stop_id for this below.
m_thread_stop_reason_stop_id = process_stop_id;
m_actual_stop_info_sp.reset();
OperatingSystem *os = process_sp->GetOperatingSystem ();
if (os)
m_actual_stop_info_sp = os->CreateThreadStopReason (this);
}
}
return m_actual_stop_info_sp;
}
示例2: backing_stop_info_sp
bool
ThreadMemory::CalculateStopInfo ()
{
if (m_backing_thread_sp)
{
lldb::StopInfoSP backing_stop_info_sp (m_backing_thread_sp->GetPrivateStopInfo());
if (backing_stop_info_sp && backing_stop_info_sp->IsValidForOperatingSystemThread(*this))
{
backing_stop_info_sp->SetThread (shared_from_this());
SetStopInfo (backing_stop_info_sp);
return true;
}
}
else
{
ProcessSP process_sp (GetProcess());
if (process_sp)
{
OperatingSystem *os = process_sp->GetOperatingSystem ();
if (os)
{
SetStopInfo (os->CreateThreadStopReason (this));
return true;
}
}
}
return false;
}