Commit 8b0a07f6 authored by hjk's avatar hjk
Browse files

Debugger: Partially revert 7b8c58b9



Caused problems with MinGW/Start in Terminal.

Change-Id: I6b88687f2eddd4437a329bf5cf2bd0bf86044cb0
Task-number: QTCREATORBUG-14069
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 9d4910f3
......@@ -1464,6 +1464,9 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
// This is gdb 7+'s initial *stopped in response to attach that
// appears before the ^done is seen.
notifyEngineRunAndInferiorStopOk();
const DebuggerStartParameters &sp = startParameters();
if (sp.useTerminal)
continueInferiorInternal();
return;
} else {
QTC_CHECK(false);
......
......@@ -147,9 +147,8 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
switch (response.resultClass) {
case ResultDone:
if (startParameters().toolChainAbi.os() != ProjectExplorer::Abi::WindowsOS) {
showMessage(_("INFERIOR ATTACHED"));
} else {
case ResultRunning:
if (startParameters().toolChainAbi.os() == ProjectExplorer::Abi::WindowsOS) {
QString errorMessage;
// Resume thread that was suspended by console stub process (see stub code).
const qint64 mainThreadId = m_stubProc.applicationMainThreadID();
......@@ -161,21 +160,14 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
arg(mainThreadId).arg(errorMessage),
LogWarning);
}
}
if (state() == EngineRunRequested) {
// We will get a '*stopped' later that we'll interpret as 'spontaneous'
// So acknowledge the current state and put a delayed 'continue' in the pipe.
notifyEngineRunAndInferiorRunOk();
} else {
//postCommand("print 43", NoFlags, [this](const DebuggerResponse &) { continueInferiorInternal(); });
notifyEngineRunAndInferiorStopOk();
continueInferiorInternal();
} else {
showMessage(_("INFERIOR ATTACHED AND RUNNING"));
//notifyEngineRunAndInferiorRunOk();
// Wait for the upcoming *stopped and handle it there.
}
break;
case ResultRunning:
// Has anyone seen such a result lately?
showMessage(_("INFERIOR ATTACHED AND RUNNING"));
notifyEngineRunAndInferiorRunOk();
break;
case ResultError:
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
showMessage(msgPtraceError(startParameters().startMode));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment