当前位置: 首页>>代码示例>>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;未经允许,请勿转载。