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
|
// This is gdb 7+'s initial *stopped in response to attach that
|
||||||
// appears before the ^done is seen.
|
// appears before the ^done is seen.
|
||||||
notifyEngineRunAndInferiorStopOk();
|
notifyEngineRunAndInferiorStopOk();
|
||||||
|
const DebuggerStartParameters &sp = startParameters();
|
||||||
|
if (sp.useTerminal)
|
||||||
|
continueInferiorInternal();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
QTC_CHECK(false);
|
QTC_CHECK(false);
|
||||||
|
@@ -147,9 +147,8 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
|
|||||||
|
|
||||||
switch (response.resultClass) {
|
switch (response.resultClass) {
|
||||||
case ResultDone:
|
case ResultDone:
|
||||||
if (startParameters().toolChainAbi.os() != ProjectExplorer::Abi::WindowsOS) {
|
case ResultRunning:
|
||||||
showMessage(_("INFERIOR ATTACHED"));
|
if (startParameters().toolChainAbi.os() == ProjectExplorer::Abi::WindowsOS) {
|
||||||
} else {
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
// Resume thread that was suspended by console stub process (see stub code).
|
// Resume thread that was suspended by console stub process (see stub code).
|
||||||
const qint64 mainThreadId = m_stubProc.applicationMainThreadID();
|
const qint64 mainThreadId = m_stubProc.applicationMainThreadID();
|
||||||
@@ -161,20 +160,13 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
|
|||||||
arg(mainThreadId).arg(errorMessage),
|
arg(mainThreadId).arg(errorMessage),
|
||||||
LogWarning);
|
LogWarning);
|
||||||
}
|
}
|
||||||
}
|
notifyEngineRunAndInferiorStopOk();
|
||||||
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(); });
|
|
||||||
continueInferiorInternal();
|
continueInferiorInternal();
|
||||||
}
|
} else {
|
||||||
break;
|
|
||||||
case ResultRunning:
|
|
||||||
// Has anyone seen such a result lately?
|
|
||||||
showMessage(_("INFERIOR ATTACHED AND RUNNING"));
|
showMessage(_("INFERIOR ATTACHED AND RUNNING"));
|
||||||
notifyEngineRunAndInferiorRunOk();
|
//notifyEngineRunAndInferiorRunOk();
|
||||||
|
// Wait for the upcoming *stopped and handle it there.
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ResultError:
|
case ResultError:
|
||||||
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
|
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
|
||||||
|
Reference in New Issue
Block a user