本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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);
}
}
示例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);
}