Debugger: Fix attaching to core for LLDB

Task-number: QTCREATORBUG-18722
Change-Id: I4579fff9725f4a7578642080a010ca54b221969b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-02-07 15:23:43 +01:00
parent 75f774a341
commit 42e224eb4b
3 changed files with 18 additions and 3 deletions

View File

@@ -157,6 +157,15 @@ void LldbEngine::debugLastCommand()
runCommand(m_lastDebuggableCommand);
}
void LldbEngine::handleAttachedToCore()
{
QTC_ASSERT(state() == InferiorUnrunnable, qDebug() << state();return);
showMessage("Attached to core.");
reloadFullStack();
reloadModules();
updateLocals();
}
void LldbEngine::shutdownInferior()
{
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
@@ -851,9 +860,11 @@ void LldbEngine::handleStateNotification(const GdbMi &reportedState)
} else if (newState == "enginerunandinferiorstopok") {
notifyEngineRunAndInferiorStopOk();
continueInferior();
} else if (newState == "enginerunokandinferiorunrunnable")
} else if (newState == "enginerunokandinferiorunrunnable") {
notifyEngineRunOkAndInferiorUnrunnable();
else if (newState == "inferiorshutdownfinished")
if (runParameters().startMode == AttachCore)
handleAttachedToCore();
} else if (newState == "inferiorshutdownfinished")
notifyInferiorShutdownFinished();
else if (newState == "engineshutdownfinished")
notifyEngineShutdownFinished();