本文整理汇总了C++中BreakPointInfoPtr::breakable方法的典型用法代码示例。如果您正苦于以下问题:C++ BreakPointInfoPtr::breakable方法的具体用法?C++ BreakPointInfoPtr::breakable怎么用?C++ BreakPointInfoPtr::breakable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BreakPointInfoPtr
的用法示例。
在下文中一共展示了BreakPointInfoPtr::breakable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: interrupt
// Handle an interrupt from the VM.
void DebuggerProxy::interrupt(CmdInterrupt &cmd) {
TRACE(2, "DebuggerProxy::interrupt\n");
changeBreakPointDepth(cmd);
if (cmd.getInterruptType() == BreakPointReached) {
if (!needInterrupt()) return;
// NB: stepping is represented as a BreakPointReached interrupt.
// Modify m_lastLocFilter to save current location. This will short-circuit
// the work done up in phpDebuggerOpcodeHook() and ensure we don't break on
// this line until we're completely off of it.
InterruptSite *site = cmd.getSite();
if (g_vmContext->m_lastLocFilter) {
g_vmContext->m_lastLocFilter->clear();
} else {
g_vmContext->m_lastLocFilter = new VM::PCFilter();
}
if (debug && Trace::moduleEnabled(Trace::bcinterp, 5)) {
Trace::trace("prepare source loc filter\n");
const VM::OffsetRangeVec& offsets = site->getCurOffsetRange();
for (VM::OffsetRangeVec::const_iterator it = offsets.begin();
it != offsets.end(); ++it) {
Trace::trace("block source loc in %s:%d: unit %p offset [%d, %d)\n",
site->getFile(), site->getLine0(),
site->getUnit(), it->m_base, it->m_past);
}
}
g_vmContext->m_lastLocFilter->addRanges(site->getUnit(),
site->getCurOffsetRange());
// If the breakpoint is not to be processed, we should continue execution.
BreakPointInfoPtr bp = getBreakPointAtCmd(cmd);
if (bp) {
if (!bp->breakable(getRealStackDepth())) {
return;
} else {
bp->unsetBreakable(getRealStackDepth());
}
}
}
// Wait until this thread is the thread this proxy wants to debug.
// NB: breakpoints and control flow checks happen here, too, and return false
// if we're not done with the flow, or not at a breakpoint, etc.
if (!blockUntilOwn(cmd, true)) {
return;
}
if (processFlowBreak(cmd)) {
while (true) {
try {
Lock lock(m_signalMutex);
m_signum = CmdSignal::SignalNone;
processInterrupt(cmd);
} catch (const DebuggerException &e) {
switchThreadMode(Normal);
throw;
} catch (...) {
assert(false); // no other exceptions should be seen here
switchThreadMode(Normal);
throw;
}
if (cmd.getInterruptType() == PSPEnded) {
switchThreadMode(Normal);
return; // we are done with this thread
}
if (!m_newThread) {
break; // we're not switching threads
}
switchThreadMode(Normal, m_newThread->m_id);
blockUntilOwn(cmd, false);
}
}
if (m_threadMode == Normal) {
Lock lock(this);
m_thread = 0;
notify();
} else if (cmd.getInterruptType() == PSPEnded) {
switchThreadMode(Normal); // we are done with this thread
}
}