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


C++ IDebugger类代码示例

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


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

示例1: FindBreakpointById

bool BreakptMgr::DelBreakpoint(const int id)
{
    int index = FindBreakpointById(id, m_bps);
    if (index == wxNOT_FOUND) {
        return false;
    }

    //remove it from the debugger if it's running
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        if (id > FIRST_INTERNAL_ID) {
            // This shouldn't happen while the debugger is running (debugger_id should be valid)
            // But if it does, assume it was a bp that gdb couldn't create, and just remove from the bp list
        } else {
            bool contIsNeeded = PauseDebuggerIfNeeded();
            if (dbgr->RemoveBreak(id)) {
                // Strangely, -break-delete doesn't output any confirmation except for ^done. So do it here
                wxString msg = ((m_bps.at(index).bp_type == BP_type_watchpt) ? _("Watchpoint ") : _("Breakpoint "));
                ManagerST::Get()->UpdateAddLine(msg + wxString::Format(_("%u deleted"), id));
            }
            if (contIsNeeded) {
                dbgr->Continue();
            }
        }
    }

    // Delete all markers before removing bp from the vector. Otherwise if id was the last in a file...
    DeleteAllBreakpointMarkers();

    m_bps.erase(m_bps.begin()+index);

    RefreshBreakpointMarkers();
    return true;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:34,代码来源:breakpointsmgr.cpp

示例2: dlg

// Add a breakpoint using the 'Properties' dialog
void BreakptMgr::AddBreakpoint()
{
    BreakptPropertiesDlg dlg(NULL);
    dlg.SetTitle(_("Create a breakpoint or watchpoint"));

    LEditor* const editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
    BreakpointInfo bp;
    bp.Create(editor ? editor->GetFileName().GetFullPath() : wxString(), editor ? editor->GetCurrentLine() : -1, GetNextID());
    dlg.EnterBPData(bp);

    if (dlg.ShowModal() != wxID_OK) {
        return;
    }

    if (AddBreakpoint(dlg.b)) {
        IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
        if ((!dlg.b.is_enabled) && dbgr && dbgr->IsRunning()) {
            SetBPEnabledState(dlg.b.debugger_id, dlg.b.is_enabled);
        }
        wxString msg;
        if (dlg.b.bp_type == BP_type_watchpt) {
            msg = _("Watchpoint successfully added");
        } else {
            msg = _("Breakpoint successfully added");
        }
        clMainFrame::Get()->SetStatusMessage(msg, 0);
    }
}
开发者ID:qioixiy,项目名称:codelite,代码行数:29,代码来源:breakpointsmgr.cpp

示例3: OnMouseMove

void DisplayVariableDlg::OnMouseMove(wxMouseEvent& event)
{
    DebuggerInformation debuggerInfo;
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr) {
        DebuggerMgr::Get().GetDebuggerInformation(dbgr->GetName(), debuggerInfo);
    }

    if (debuggerInfo.autoExpandTipItems) {
        int flags (0);
        wxTreeItemId item = m_treeCtrl->HitTest(event.GetPosition(), flags);
        if (item.IsOk() && (flags & wxTREE_HITTEST_ONITEMLABEL)) {

            if (item != m_hoveredItem) {
                m_timer2->Stop();
                m_hoveredItem = item;
                m_timer2->Start(500, true);
                return;

            } else
                return;

        }

        m_hoveredItem = wxTreeItemId();
        m_timer2->Stop();
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:28,代码来源:new_quick_watch_dlg.cpp

示例4: AddBreakpoint

bool BreakptMgr::AddBreakpoint(const BreakpointInfo &bp)
{
    if (bp.bp_type != BP_type_watchpt &&
        bp.file.IsEmpty() && bp.function_name.IsEmpty() && bp.memory_address.IsEmpty() && bp.lineno == wxNOT_FOUND) {
        // no function nor file? no memory address?
        // do nothing then
        return true;
    }

    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        // If the debugger is already running, tell it we want a new bp
        // If not, they'll all be added together when the debugger does start
        bool contIsNeeded = PauseDebuggerIfNeeded();

        dbgr->Break(bp);

        if (contIsNeeded) {
            dbgr->Continue();
        }
    }

    BreakpointInfo newBreakpoint(bp);
    SetBestBPType(newBreakpoint);
    
    BreakpointInfoVec_t::const_iterator iter = std::find(m_bps.begin(), m_bps.end(), newBreakpoint);
    if ( iter == m_bps.end() ) {
        // new breakpoint
        m_bps.push_back( newBreakpoint );
    }
    
    DeleteAllBreakpointMarkers();
    RefreshBreakpointMarkers();
    return true;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:35,代码来源:breakpointsmgr.cpp

示例5: IsNativeDebuggerRunning

bool DebuggerMgr::IsNativeDebuggerRunning() const
{
    std::map<wxString, IDebugger*>::const_iterator iter = m_debuggers.find(m_activeDebuggerName);
    if(iter == m_debuggers.end()) { return false; }
    
    IDebugger* d = iter->second;
    return d && d->IsRunning();
}
开发者ID:lpc1996,项目名称:codelite,代码行数:8,代码来源:debuggermanager.cpp

示例6: OnFrameSelected

void DebuggerCallstackView::OnFrameSelected(clCommandEvent& e)
{
    e.Skip();
    IDebugger* dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if(dbgr && dbgr->IsRunning() && ManagerST::Get()->DbgCanInteract()) {
        // set the frame
        dbgr->QueryFileLine();
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:9,代码来源:DebuggerCallstackView.cpp

示例7: GetColumnText

void WatchesTable::DoShowMoreDetails(long item)
{
	if( item != wxNOT_FOUND ) {
		wxString value = GetColumnText(item, 0);
		IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
		if ( dbgr && dbgr->IsRunning() && ManagerST::Get()->DbgCanInteract() ) {
			dbgr->CreateVariableObject( value, DBG_USERR_WATCHTABLE );
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:10,代码来源:simpletable.cpp

示例8: PauseDebuggerIfNeeded

// If the debugger is running but can't interact, pause it and return true (to flag needs restart)
bool BreakptMgr::PauseDebuggerIfNeeded()
{
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning() && !ManagerST::Get()->DbgCanInteract()) {
        SetExpectingControl(true);
        dbgr->Interrupt();
        return true;
    }
    return false;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:11,代码来源:breakpointsmgr.cpp

示例9: OnRefreshView

void DebuggerDisassemblyTab::OnRefreshView(clCommandEvent& e)
{
    e.Skip();
    IDebugger* debugger = DebuggerMgr::Get().GetActiveDebugger();
    if(debugger && debugger->IsRunning() && ManagerST::Get()->DbgCanInteract()) {
        // Only update disass view if the view is visible
        if(ManagerST::Get()->IsDebuggerViewVisible(DebuggerPane::DISASSEMBLY)) {
            debugger->ListRegisters();
            debugger->Disassemble("", -1);
        }
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:12,代码来源:DebuggerDisassemblyTab.cpp

示例10: RefreshValues

void WatchesTable::RefreshValues()
{
	//ask the debugger to update the table
	//to trigger the update for the table we issue a simple
	//file line update request from the debugger
	if (ManagerST::Get()->DbgCanInteract()) {
		IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
		if (dbgr && dbgr->IsRunning()) {
			dbgr->QueryFileLine();
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:12,代码来源:simpletable.cpp

示例11: SetBPEnabledState

bool BreakptMgr::SetBPEnabledState(const int bid, const bool enable)
{
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        // If the debugger is already running, tell it about the new 'enable' level
        // If not, it'll happen automatically when the debugger does start
        bool contIsNeeded = PauseDebuggerIfNeeded();
        bool result = dbgr->SetEnabledState(bid, enable);
        if (contIsNeeded) {
            dbgr->Continue();
        }
        return result;
    }
    return true;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:15,代码来源:breakpointsmgr.cpp

示例12: SetBPConditon

bool BreakptMgr::SetBPConditon(const BreakpointInfo& bp)
{
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        // If the debugger is already running, tell it about the condition
        // If not, it'll happen automatically when the debugger does start
        bool contIsNeeded = PauseDebuggerIfNeeded();
        bool result = dbgr->SetCondition(bp);
        if (contIsNeeded) {
            dbgr->Continue();
        }
        return result;
    }
    return false;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:15,代码来源:breakpointsmgr.cpp

示例13: SetBPIgnoreCount

bool BreakptMgr::SetBPIgnoreCount(const int bid, const int ignorecount)
{
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        // If the debugger is already running, tell it about the new ignore level
        // If not, it'll happen automatically when the debugger does start
        bool contIsNeeded = PauseDebuggerIfNeeded();
        bool result = dbgr->SetIgnoreLevel(bid, ignorecount);
        if (contIsNeeded) {
            dbgr->Continue();
        }
        return result;
    }
    return true;
}
开发者ID:qioixiy,项目名称:codelite,代码行数:15,代码来源:breakpointsmgr.cpp

示例14: UpdateVariableObjects

void DebuggerTreeListCtrlBase::UpdateVariableObjects()
{
    IDebugger *debugger = DebuggerMgr::Get().GetActiveDebugger();
    if(!debugger)
        return;

    wxTreeItemId root = m_listTable->GetRootItem();
    wxTreeItemIdValue cookieOne;
    wxTreeItemId item = m_listTable->GetFirstChild(root, cookieOne);
    while( item.IsOk() ) {
        wxString gdbID = DoGetGdbId(item);
        if(gdbID.IsEmpty() == false) {
            debugger->UpdateVariableObject(gdbID, m_DBG_USERR);
        }
        item = m_listTable->GetNextChild(root, cookieOne);
    }
}
开发者ID:since2014,项目名称:codelite,代码行数:17,代码来源:simpletablebase.cpp

示例15: DelAllBreakpoints

void BreakptMgr::DelAllBreakpoints()
{
    IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
    if (dbgr && dbgr->IsRunning()) {
        bool contIsNeeded = PauseDebuggerIfNeeded();
        dbgr->RemoveAllBreaks();
        if (contIsNeeded) {
            dbgr->Continue();
        }
    }

    // Delete all markers before clearing m_bps, otherwise we won't know which files they were in
    DeleteAllBreakpointMarkers();
    m_bps.clear();
    m_pendingBreakpointsList.clear();	// Delete any pending bps too
    clMainFrame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize();
}
开发者ID:qioixiy,项目名称:codelite,代码行数:17,代码来源:breakpointsmgr.cpp


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