当前位置: 首页>>代码示例>>C++>>正文


C++ OperatingSystem::CreateThreadStopReason方法代码示例

本文整理汇总了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;
    
}
开发者ID:ztianjin,项目名称:lldb,代码行数:30,代码来源:ThreadMemory.cpp

示例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;
}
开发者ID:CodaFi,项目名称:swift-lldb,代码行数:29,代码来源:ThreadMemory.cpp


注:本文中的OperatingSystem::CreateThreadStopReason方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。