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


C++ LLDBEvent::GetInterruptReason方法代码示例

本文整理汇总了C++中LLDBEvent::GetInterruptReason方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDBEvent::GetInterruptReason方法的具体用法?C++ LLDBEvent::GetInterruptReason怎么用?C++ LLDBEvent::GetInterruptReason使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLDBEvent的用法示例。


在下文中一共展示了LLDBEvent::GetInterruptReason方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnLLDBStopped

void MainDialog::OnLLDBStopped(LLDBEvent& e)
{
    e.Skip();
    
    wxString msg;
    msg << "Process stopped. " << e.GetFileName() << ":" << e.GetLinenumber();
    m_textCtrlLog->AppendText(msg + "\n");
    m_textCtrlLog->AppendText("Backtrace:\n");
    m_textCtrlLog->AppendText(e.GetBacktrace().ToString() + "\n");
    
    // If we have an "Interrupt reason" set, then the stop was due to user request
    // handle this separately
    if ( e.GetInterruptReason() == kInterruptReasonApplyBreakpoints ) {
        // Apply breakpoints failed, due to debugger can not interact
        // now that we stopped - try it again
        m_connector.ApplyBreakpoints();
        m_connector.Continue();

    } else if ( e.GetInterruptReason() == kInterruptReasonDeleteAllBreakpoints ) {
        // Could not delete all breakpoints because the debugger was not 
        // in an interactive mode - do it now
        m_connector.DeleteBreakpoints();
        m_connector.Continue();

    }
}
开发者ID:qioixiy,项目名称:codelite,代码行数:26,代码来源:MainDialog.cpp

示例2: OnLLDBStopped

void LLDBPlugin::OnLLDBStopped(LLDBEvent& event)
{
    event.Skip();
    CL_DEBUGS(wxString() << "CODELITE>> LLDB stopped at " << event.GetFileName() << ":" << event.GetLinenumber());
    m_connector.SetCanInteract(true);

    if(event.GetInterruptReason() == kInterruptReasonNone) {

        if(m_raisOnBpHit) { EventNotifier::Get()->TopFrame()->Raise(); }

        // Mark the debugger line / file
        IEditor* editor = m_mgr->FindEditor(event.GetFileName());
        if(!editor && wxFileName::Exists(event.GetFileName())) {
            // Try to open the editor
            editor = m_mgr->OpenFile(event.GetFileName(), "", event.GetLinenumber() - 1);
        }

        if(editor) {
            // select it first
            if(editor != m_mgr->GetActiveEditor()) {
                m_mgr->SelectPage(editor->GetCtrl());

            } else {
                // just make sure that the page has the focus
                editor->SetActive();
            }

            // clear the markers
            ClearDebuggerMarker();
            SetDebuggerMarker(editor->GetCtrl(), event.GetLinenumber() - 1);

        } else {
            ClearDebuggerMarker();
        }

        // request for local variables
        m_connector.RequestLocals();

        wxString message;
        if(!m_stopReasonPrompted && event.ShouldPromptStopReason(message)) {
            m_stopReasonPrompted = true; // show this message only once per debug session
            wxString msg;
            msg << "Program stopped\nStop reason: " << message;
            ::wxMessageBox(msg, "CodeLite", wxICON_ERROR | wxOK | wxCENTER);
        }

    } else if(event.GetInterruptReason() == kInterruptReasonApplyBreakpoints) {
        CL_DEBUG("Applying breakpoints and continue...");
        m_connector.ApplyBreakpoints();
        m_connector.Continue();

    } else if(event.GetInterruptReason() == kInterruptReasonDeleteAllBreakpoints) {
        CL_DEBUG("Deleting all breakpoints");
        m_connector.DeleteAllBreakpoints();
        m_connector.Continue();

    } else if(event.GetInterruptReason() == kInterruptReasonDeleteBreakpoint) {
        CL_DEBUG("Deleting all pending deletion breakpoints");
        m_connector.DeleteBreakpoints();
        m_connector.Continue();

    } else if(event.GetInterruptReason() == kInterruptReasonDetaching) {
        CL_DEBUG("Detaching from process");
        m_connector.Detach();
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:66,代码来源:LLDBPlugin.cpp


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