forked from qt-creator/qt-creator
Debugger: Force LLDB round trip between stack and locals update
The stack might produce data (such as as the QML context in native mixed debugging) that is needed for locals display. While this doesn't work yet with LLDB anyway, the change suppresses one soft access when accessing the top frame of an empty stack (the usual case on the first update). Change-Id: If931fbe940b8cda01cc6cc34429a2fcb33cd8d19 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -460,6 +460,8 @@ void LldbEngine::handleResponse(const QByteArray &response)
|
||||
refreshMemory(item);
|
||||
else if (name == "full-backtrace")
|
||||
showFullBacktrace(item);
|
||||
else if (name == "continuation")
|
||||
handleContinuation(item);
|
||||
else if (name == "statusmessage") {
|
||||
QString msg = QString::fromUtf8(item.data());
|
||||
if (msg.size())
|
||||
@@ -469,6 +471,15 @@ void LldbEngine::handleResponse(const QByteArray &response)
|
||||
}
|
||||
}
|
||||
|
||||
void LldbEngine::handleContinuation(const GdbMi &data)
|
||||
{
|
||||
if (data.data() == "updateLocals") {
|
||||
updateLocals();
|
||||
return;
|
||||
}
|
||||
QTC_ASSERT(false, qDebug() << "Unknown continuation: " << data.data());
|
||||
}
|
||||
|
||||
void LldbEngine::showFullBacktrace(const GdbMi &data)
|
||||
{
|
||||
Internal::openTextEditor(_("Backtrace $"),
|
||||
@@ -524,10 +535,10 @@ void LldbEngine::activateFrame(int frameIndex)
|
||||
DebuggerCommand cmd("activateFrame");
|
||||
cmd.arg("index", frameIndex);
|
||||
cmd.arg("thread", threadsHandler()->currentThread().raw());
|
||||
cmd.arg("continuation", "updateLocals");
|
||||
runCommand(cmd);
|
||||
|
||||
reloadRegisters();
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
void LldbEngine::selectThread(ThreadId threadId)
|
||||
@@ -793,8 +804,12 @@ bool LldbEngine::setToolTipExpression(TextEditor::TextEditorWidget *editorWidget
|
||||
void LldbEngine::updateAll()
|
||||
{
|
||||
reloadRegisters();
|
||||
updateStack();
|
||||
updateLocals();
|
||||
|
||||
DebuggerCommand cmd("reportStack");
|
||||
cmd.arg("nativeMixed", isNativeMixedActive());
|
||||
cmd.arg("stacklimit", action(MaximalStackDepth)->value().toInt());
|
||||
cmd.arg("continuation", "updateLocals");
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
void LldbEngine::reloadFullStack()
|
||||
@@ -805,14 +820,6 @@ void LldbEngine::reloadFullStack()
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
void LldbEngine::updateStack()
|
||||
{
|
||||
DebuggerCommand cmd("reportStack");
|
||||
cmd.arg("nativeMixed", isNativeMixedActive());
|
||||
cmd.arg("stacklimit", action(MaximalStackDepth)->value().toInt());
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Watch specific stuff
|
||||
|
||||
Reference in New Issue
Block a user