forked from qt-creator/qt-creator
Debugger: Partially revert 7b8c58b
Caused problems with MinGW/Start in Terminal. Change-Id: I6b88687f2eddd4437a329bf5cf2bd0bf86044cb0 Task-number: QTCREATORBUG-14069 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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,20 +160,13 @@ 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();
|
||||
}
|
||||
break;
|
||||
case ResultRunning:
|
||||
// Has anyone seen such a result lately?
|
||||
} else {
|
||||
showMessage(_("INFERIOR ATTACHED AND RUNNING"));
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
//notifyEngineRunAndInferiorRunOk();
|
||||
// Wait for the upcoming *stopped and handle it there.
|
||||
}
|
||||
break;
|
||||
case ResultError:
|
||||
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
|
||||
|
Reference in New Issue
Block a user