本文整理汇总了C++中StackHandler::setCurrentIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ StackHandler::setCurrentIndex方法的具体用法?C++ StackHandler::setCurrentIndex怎么用?C++ StackHandler::setCurrentIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StackHandler
的用法示例。
在下文中一共展示了StackHandler::setCurrentIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activateFrame
void LldbEngine::activateFrame(int frameIndex)
{
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
StackHandler *handler = stackHandler();
const int n = handler->stackSize();
if (frameIndex == n) {
DebuggerCommand cmd("reportStack");
cmd.arg("nativeMixed", isNativeMixedActive());
cmd.arg("stacklimit", n * 10 + 3);
runCommand(cmd);
return;
}
QTC_ASSERT(frameIndex < handler->stackSize(), return);
handler->setCurrentIndex(frameIndex);
gotoLocation(handler->currentFrame());
DebuggerCommand cmd("activateFrame");
cmd.arg("index", frameIndex);
cmd.arg("thread", threadsHandler()->currentThread().raw());
cmd.arg("continuation", "updateLocals");
runCommand(cmd);
}
示例2: activateFrame
void PdbEngine::activateFrame(int frameIndex)
{
resetLocation();
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
StackHandler *handler = stackHandler();
int oldIndex = handler->currentIndex();
//if (frameIndex == handler->stackSize()) {
// reloadFullStack();
// return;
//}
QTC_ASSERT(frameIndex < handler->stackSize(), return);
if (oldIndex != frameIndex) {
// Assuming the command always succeeds this saves a roundtrip.
// Otherwise the lines below would need to get triggered
// after a response to this -stack-select-frame here.
handler->setCurrentIndex(frameIndex);
//postCommand("-stack-select-frame " + QByteArray::number(frameIndex),
// CB(handleStackSelectFrame));
}
gotoLocation(handler->currentFrame());
}
示例3: activateFrame
void PdbEngine::activateFrame(int frameIndex)
{
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
StackHandler *handler = stackHandler();
QTC_ASSERT(frameIndex < handler->stackSize(), return);
handler->setCurrentIndex(frameIndex);
gotoLocation(handler->currentFrame());
updateLocals();
}
示例4: rpcCallback
//.........这里部分代码省略.........
case IPCEngineGuest::ShowStatusMessage:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
QString msg;
qint64 timeout;
s >> msg;
s >> timeout;
showStatusMessage(msg, timeout);
}
break;
case IPCEngineGuest::ShowMessage:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
QString msg;
qint16 channel;
qint64 timeout;
s >> msg;
s >> channel;
s >> timeout;
showMessage(msg, channel, timeout);
}
break;
case IPCEngineGuest::CurrentFrameChanged:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
quint64 token;
s >> token;
resetLocation();
StackHandler *sh = stackHandler();
sh->setCurrentIndex(token);
if (!sh->currentFrame().isUsable() || QFileInfo(sh->currentFrame().file).exists())
gotoLocation(Location(sh->currentFrame(), true));
else if (!m_sourceAgents.contains(sh->currentFrame().file))
fetchFrameSource(token);
foreach(SourceAgent *agent, m_sourceAgents.values())
agent->updateLocationMarker();
}
break;
case IPCEngineGuest::CurrentThreadChanged:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
quint64 token;
s >> token;
threadsHandler()->setCurrentThreadId(token);
}
break;
case IPCEngineGuest::ListFrames:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
StackFrames frames;
s >> frames;
stackHandler()->setFrames(frames);
}
break;
case IPCEngineGuest::ListThreads:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
Threads threads;
s >> threads;