diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-12-06 11:25:06 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-12-09 15:41:59 +0000 |
commit | d4d0b889a032b161d527e9e5aa0f6c4bb817db0d (patch) | |
tree | ead1c6c2751638b293b927a1ea276f8aeb89629d /src/plugins/debugger | |
parent | f6683332a621bbe517bccb14f05010ff51d7e377 (diff) | |
download | qt-creator-d4d0b889a032b161d527e9e5aa0f6c4bb817db0d.tar.gz |
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>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 880c9e5fc1..489a6beb7d 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -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(); } |