Debugger: Allow incremental expansion of large stacks

Task-number: QTCREATORBUG-11108

Change-Id: Id1a155688e0e9bbe0d45cde20563929b7370695d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-02-03 13:47:26 +01:00
parent 22f9d58b0d
commit 10f0044031
2 changed files with 31 additions and 7 deletions

View File

@@ -361,7 +361,16 @@ void LldbEngine::activateFrame(int frameIndex)
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
runCommand(Command("activateFrame").arg("index", frameIndex));
int limit = debuggerCore()->action(MaximalStackDepth)->value().toInt();
int n = stackHandler()->stackSize();
if (frameIndex == n)
limit = n * 10 + 3;
Command cmd("activateFrame");
cmd.arg("index", frameIndex);
cmd.arg("thread", threadsHandler()->currentThread().raw());
cmd.arg("stacklimit", limit);
runCommand(cmd);
}
void LldbEngine::selectThread(ThreadId threadId)
@@ -970,7 +979,7 @@ void LldbEngine::refreshStack(const GdbMi &stack)
}
bool canExpand = stack["hasmore"].toInt();
debuggerCore()->action(ExpandStack)->setEnabled(canExpand);
handler->setFrames(frames);
handler->setFrames(frames, canExpand);
int index = stack["current-frame"].toInt();
handler->setCurrentIndex(index);