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


C++ clDebugEvent::GetInt方法代码示例

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


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

示例1: OnToggleBreakpoint

void XDebugManager::OnToggleBreakpoint(clDebugEvent& e)
{
    if ( !PHPWorkspace::Get()->IsOpen() ) {
        e.Skip();
        return;
    }
    
    // User toggled a breakpoint
    IEditor* editor = m_plugin->GetManager()->GetActiveEditor();
    if ( editor && editor->GetFileName().GetFullPath() == e.GetFileName() ) {
        // Correct editor
        // add marker
        if ( m_breakpointsMgr.HasBreakpoint(e.GetFileName(), e.GetInt()) ) {
            
            XDebugBreakpoint bp;
            m_breakpointsMgr.GetBreakpoint(e.GetFileName(), e.GetInt(), bp);
            if ( bp.IsApplied() && m_readerThread ) {
                // Remove it from XDebug as well
                DoDeleteBreakpoint( bp.GetBreakpointId() );
                
            }
            m_breakpointsMgr.DeleteBreakpoint( e.GetFileName(), e.GetInt() );
            
        } else {
            m_breakpointsMgr.AddBreakpoint( e.GetFileName(), e.GetInt() );
            DoApplyBreakpoints();
            
        }
        DoRefreshBreakpointsMarkersForEditor( editor );
    }
}
开发者ID:gahr,项目名称:codelite,代码行数:31,代码来源:XDebugManager.cpp

示例2: OnToggleBreakpoint

void NodeJSDebugger::OnToggleBreakpoint(clDebugEvent& event)
{
    event.Skip();
    if(NodeJSWorkspace::Get()->IsOpen()) {
        event.Skip(false);
        IEditor* editor = clGetManager()->GetActiveEditor();
        if(editor && (editor->GetFileName().GetFullPath() == event.GetFileName())) {
            // Correct editor
            // add marker
            NodeJSBreakpoint bp = m_bptManager.GetBreakpoint(event.GetFileName(), event.GetInt());
            if(bp.IsOk()) {
                if(bp.IsApplied() && IsConnected()) {
                    // Tell NodeJS to delete this breakpoint
                    DeleteBreakpoint(bp);
                }
                m_bptManager.DeleteBreakpoint(event.GetFileName(), event.GetInt());
            } else {
                // We have no breakpoint on this file/line (yet)
                m_bptManager.AddBreakpoint(event.GetFileName(), event.GetInt());
                bp = m_bptManager.GetBreakpoint(event.GetFileName(), event.GetInt());
                if(IsConnected()) {
                    SetBreakpoint(bp);
                }
            }

            // Update the UI
            m_bptManager.SetBreakpoints(editor);
            clDebugEvent event(wxEVT_NODEJS_DEBUGGER_UPDATE_BREAKPOINTS_VIEW);
            EventNotifier::Get()->AddPendingEvent(event);
        }
    }
}
开发者ID:capturePointer,项目名称:codelite,代码行数:32,代码来源:NodeJSDebugger.cpp

示例3: OnDebugAttachToProcess

void LLDBPlugin::OnDebugAttachToProcess(clDebugEvent& event)
{
    if(event.GetDebuggerName() != LLDB_DEBUGGER_NAME) {
        event.Skip();
        return;
    }

#ifdef __WXMSW__
    ::wxMessageBox(
        _("Attach to process with LLDB is not supported under Windows"), "CodeLite", wxOK | wxCENTER | wxICON_WARNING);
    return;
#endif

    wxString terminalTitle;
    terminalTitle << "Console PID " << event.GetInt();
    if(!DoInitializeDebugger(event, true, terminalTitle))
        return;

    LLDBConnectReturnObject retObj;
    LLDBSettings settings;
    settings.Load();

    if(m_connector.Connect(retObj, settings, 5)) {

        // Apply the environment
        EnvSetter env;

        // remove all breakpoints from previous session
        m_connector.DeleteAllBreakpoints();
        LLDBSettings settings;
        settings.Load();

        // Attach to the process
        LLDBCommand command;
        command.SetCommandType(kCommandAttachProcess);
        command.SetProcessID(event.GetInt());
        command.SetSettings(settings);
        m_connector.AttachProcessWithPID(command);

    } else {
        // Failed to connect, notify and perform cleanup
        DoCleanup();
        wxString message;
        message << _("Could not connect to codelite-lldb at '") << m_connector.GetConnectString() << "'";
        ::wxMessageBox(message, "CodeLite", wxICON_ERROR | wxOK | wxCENTER);
        return;
    }
}
开发者ID:raresp,项目名称:codelite,代码行数:48,代码来源:LLDBPlugin.cpp

示例4: OnToggleBreakpoint

void LLDBPlugin::OnToggleBreakpoint(clDebugEvent& event)
{
    // Call Skip() here since we want codelite to manage the breakpoint as well ( in term of serialization in the
    // session file )
    CHECK_IS_LLDB_SESSION();

    // check to see if we are removing a breakpoint or adding one
    LLDBBreakpoint::Ptr_t bp(new LLDBBreakpoint(event.GetFileName(), event.GetInt()));
    IEditor* editor = m_mgr->GetActiveEditor();

    if(editor) {
        // get the marker type set on the line
        int markerType = editor->GetCtrl()->MarkerGet(bp->GetLineNumber() - 1);
        for(size_t type = smt_FIRST_BP_TYPE; type <= smt_LAST_BP_TYPE; ++type) {
            int markerMask = (1 << type);
            if(markerType & markerMask) {
                // removing a breakpoint. "DeleteBreakpoint" will handle the interactive/non-interactive mode
                // of the debugger
                m_connector.MarkBreakpointForDeletion(bp);
                m_connector.DeleteBreakpoints();
                return;
            }
        }

        // if we got here, its a new breakpoint, add it
        // Add the breakpoint to the list of breakpoints
        m_connector.AddBreakpoint(bp->GetFilename(), bp->GetLineNumber());

        // apply it. In case the debugger can not interact with, it will be interrupted and the interrupt reason
        // will be set to ApplyBreakpoints
        m_connector.ApplyBreakpoints();
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:33,代码来源:LLDBPlugin.cpp

示例5: OnAttach

void NodeJSDebugger::OnAttach(clDebugEvent& event)
{
#ifdef __WXMSW__
    if(event.GetDebuggerName() != "NodeJS Debugger") {
        event.Skip();
        return;
    }
    event.Skip(false);
    ::wxMessageBox(_("Debugging a running Node.js process is only available on Linux / OSX"), "CodeLite",
                   wxICON_WARNING | wxCENTER | wxOK);
#else

    if(event.GetDebuggerName() != "NodeJS Debugger") {
        event.Skip();
        return;
    }

    event.Skip(false); // ours to handle, stop the event chain

    if(m_socket && m_socket->IsConnected()) {
        ::wxMessageBox(_("An active debug session is already running"), "CodeLite", wxICON_WARNING | wxCENTER | wxOK);
        return;
    };

    ::kill(event.GetInt(), SIGUSR1);
    // already connected?
    m_socket.Reset(new NodeJSSocket(this));
    m_socket->Connect("127.0.0.1", 5858);
#endif
}
开发者ID:lpc1996,项目名称:codelite,代码行数:30,代码来源:NodeJSDebugger.cpp


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