當前位置: 首頁>>代碼示例>>C++>>正文


C++ FindBreakpoint函數代碼示例

本文整理匯總了C++中FindBreakpoint函數的典型用法代碼示例。如果您正苦於以下問題:C++ FindBreakpoint函數的具體用法?C++ FindBreakpoint怎麽用?C++ FindBreakpoint使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了FindBreakpoint函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: FindBreakpoint

void CBreakPoints::RemoveBreakPoint(u32 addr)
{
	size_t bp = FindBreakpoint(addr);
	if (bp != INVALID_BREAKPOINT)
	{
		breakPoints_.erase(breakPoints_.begin() + bp);

		// Check again, there might've been an overlapping temp breakpoint.
		bp = FindBreakpoint(addr);
		if (bp != INVALID_BREAKPOINT)
			breakPoints_.erase(breakPoints_.begin() + bp);

		Update(addr);
	}
}
開發者ID:AdmiralCurtiss,項目名稱:ppsspp,代碼行數:15,代碼來源:Breakpoints.cpp

示例2: FindBreakpoint

void CDebuggerView::OnDbTogglebreakpoint()
{
    int pos = m_editor.SendEditor(SCI_GETCURRENTPOS);
    int lineNumber = m_editor.SendEditor(SCI_LINEFROMPOSITION, pos);

    // Is there a breakpoint currently here?
    int breakpointIndex = FindBreakpoint(m_currentFileName, lineNumber);
    if (breakpointIndex == -1)
    {
        // No, add it.
        m_editor.SendEditor(SCI_MARKERDEFINE, MARKER_BREAKPOINT, SC_MARK_CIRCLE);
        m_editor.SendEditor(SCI_MARKERSETFORE, MARKER_BREAKPOINT, RGB(0x00, 0x00, 0));
        m_editor.SendEditor(SCI_MARKERSETBACK, MARKER_BREAKPOINT, RGB(0xff, 0x00, 0x00));
        m_editor.SendEditor(SCI_MARKERADD, lineNumber, MARKER_BREAKPOINT);

        // Add the breakpoint.
        BreakpointInfo info;
        info.m_fileName = m_currentFileName;
        info.m_lineNumber = lineNumber;
        m_breakpointInfo.Add(info);
    }
    else
    {
        // Remove the breakpoint.
        m_editor.SendEditor(SCI_MARKERDELETE, lineNumber, MARKER_BREAKPOINT);
        m_breakpointInfo.RemoveAt(breakpointIndex);
    }

    CString command;
    command.Format(_T("DebugSetBreakpoint('%s',%d,%s)"), m_currentFileName, lineNumber,
                   (breakpointIndex == -1) ? _T("true") : _T("false"));
    theApp.GetNetworkClient().SendCommand(command);
}
開發者ID:mentaldease,項目名稱:bastionlandscape,代碼行數:33,代碼來源:DebuggerView.cpp

示例3: FindBreakpoint

BreakAction CBreakPoints::ExecBreakPoint(u32 addr) {
	size_t bp = FindBreakpoint(addr, false);
	if (bp != INVALID_BREAKPOINT) {
		if (breakPoints_[bp].hasCond) {
			// Evaluate the breakpoint and abort if necessary.
			auto cond = CBreakPoints::GetBreakPointCondition(currentMIPS->pc);
			if (cond && !cond->Evaluate())
				return BREAK_ACTION_IGNORE;
		}

		if (breakPoints_[bp].result & BREAK_ACTION_LOG) {
			if (breakPoints_[bp].logFormat.empty()) {
				NOTICE_LOG(JIT, "BKP PC=%08x (%s)", addr, g_symbolMap->GetDescription(addr).c_str());
			} else {
				std::string formatted;
				CBreakPoints::EvaluateLogFormat(currentDebugMIPS, breakPoints_[bp].logFormat, formatted);
				NOTICE_LOG(JIT, "BKP PC=%08x: %s", addr, formatted.c_str());
			}
		}
		if (breakPoints_[bp].result & BREAK_ACTION_PAUSE) {
			Core_EnableStepping(true);
			host->SetDebugMode(true);
		}

		return breakPoints_[bp].result;
	}

	return BREAK_ACTION_IGNORE;
}
開發者ID:FTPiano,項目名稱:ppsspp,代碼行數:29,代碼來源:Breakpoints.cpp

示例4: guard

void CBreakPoints::RemoveBreakPoint(u32 addr)
{
	std::unique_lock<std::mutex> guard(breakPointsMutex_);
	size_t bp = FindBreakpoint(addr);
	if (bp != INVALID_BREAKPOINT)
	{
		breakPoints_.erase(breakPoints_.begin() + bp);

		// Check again, there might've been an overlapping temp breakpoint.
		bp = FindBreakpoint(addr);
		if (bp != INVALID_BREAKPOINT)
			breakPoints_.erase(breakPoints_.begin() + bp);

		guard.unlock();
		Update(addr);
	}
}
開發者ID:AmesianX,項目名稱:ppsspp,代碼行數:17,代碼來源:Breakpoints.cpp

示例5: FindBreakpoint

void LLDBConnector::MarkBreakpointForDeletion(LLDBBreakpoint::Ptr_t bp)
{
    if(!IsBreakpointExists(bp)) {
        return;
    }

    LLDBBreakpoint::Vec_t::iterator iter = FindBreakpoint(bp);

    // add the breakpoint to the pending deletion breakpoints
    bp->SetId((*iter)->GetId());
    m_pendingDeletionBreakpoints.push_back(bp);
    m_breakpoints.erase(iter);
}
開發者ID:stahta01,項目名稱:codelite,代碼行數:13,代碼來源:LLDBConnector.cpp


注:本文中的FindBreakpoint函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。