forked from qt-creator/qt-creator
Debugger: Completely ignore *running message on Windows
They appear with each newly created thread, which makes them unreliable during startup, and useless later. On startup, we issue -exec-continue and expect running. But unrelated *running messages appear, and the state is changed to RunOk, although exec-continue is not done yet. This results in "UNEXPECTED STATE" error logs. Trust only response ^running. Change-Id: I5e75fcd19928dab83d83ca71e9497021766460e9 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
f6683332a6
commit
d4d0b889a0
@@ -625,15 +625,17 @@ void GdbEngine::handleAsyncOutput(const QByteArray &asyncClass, const GdbMi &res
|
||||
} else {
|
||||
GdbMi threads = result["thread-id"];
|
||||
threadsHandler()->notifyRunning(threads.data());
|
||||
if (state() == InferiorRunOk || state() == InferiorSetupRequested) {
|
||||
// We get multiple *running after thread creation and in Windows terminals.
|
||||
showMessage(QString::fromLatin1("NOTE: INFERIOR STILL RUNNING IN STATE %1.").
|
||||
arg(QLatin1String(DebuggerEngine::stateName(state()))));
|
||||
} else if (HostOsInfo::isWindowsHost() && (state() == InferiorStopRequested
|
||||
|| state() == InferiorShutdownRequested)) {
|
||||
if (runParameters().toolChainAbi.os() == Abi::WindowsOS) {
|
||||
// NOTE: Each created thread spits out a *running message. We completely ignore them
|
||||
// on Windows, and handle only numbered responses
|
||||
|
||||
// FIXME: Breakpoints on Windows are exceptions which are thrown in newly
|
||||
// created threads so we have to filter out the running threads messages when
|
||||
// we request a stop.
|
||||
} else if (state() == InferiorRunOk || state() == InferiorSetupRequested) {
|
||||
// We get multiple *running after thread creation and in Windows terminals.
|
||||
showMessage(QString::fromLatin1("NOTE: INFERIOR STILL RUNNING IN STATE %1.").
|
||||
arg(QLatin1String(DebuggerEngine::stateName(state()))));
|
||||
} else {
|
||||
notifyInferiorRunOk();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user