本文整理汇总了C++中BreakPointInfoPtr::transferStack方法的典型用法代码示例。如果您正苦于以下问题:C++ BreakPointInfoPtr::transferStack方法的具体用法?C++ BreakPointInfoPtr::transferStack怎么用?C++ BreakPointInfoPtr::transferStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BreakPointInfoPtr
的用法示例。
在下文中一共展示了BreakPointInfoPtr::transferStack方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBreakPoints
void DebuggerProxy::setBreakPoints(
std::vector<BreakPointInfoPtr>& breakpoints
) {
TRACE(2, "DebuggerProxy::setBreakPoints\n");
// Hold the break mutex while we update the proxy's state. There's no need to
// hold it over the longer operation to set breakpoints in each file later.
{
WriteLock lock(m_breakMutex);
// breakpoints holds a list of fresh new BreakPointInfo objects that
// have been deserialized from the client's list of breakpoints.
// The existing BreakPointInfo objects may include non empty values
// for m_stack. If these get thrown away, breakpoints that are temporarily
// disabled will suddenly fire again, which is not what we want to
// happen if we create a new breakpoint or just even list breakpoints.
auto it = m_breakpoints.begin();
for (auto it1 = breakpoints.begin(); it1 != breakpoints.end(); ++it1) {
BreakPointInfoPtr newBreakPoint = *it1;
do {
for (auto it2 = it; it2 != m_breakpoints.end(); ) {
BreakPointInfoPtr oldBreakPoint = *it2++;
if (oldBreakPoint->same(newBreakPoint)) {
newBreakPoint->transferStack(oldBreakPoint);
it = it2;
goto next_breakpoint;
}
}
if (it == m_breakpoints.begin()) goto next_breakpoint;
// Only searched a part of m_breakpoints. Reset it and try again.
it = m_breakpoints.begin();
} while (true);
next_breakpoint: continue;
}
m_breakpoints = breakpoints;
m_hasBreakPoints = !m_breakpoints.empty();
}
proxySetBreakPoints(this);
}