forked from qt-creator/qt-creator
Debugger: simplify interrupting on windows
Use Process::interrupt again and ignore the superfluous exceptions when debugging qbs builds with cdb reported by QTCREATORBUG-28279. Change-Id: I010d41e2b01721d63a3967c9c95d7b10d47a4472 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -484,6 +484,7 @@ void CdbEngine::handleInitialSessionIdle()
|
|||||||
runCommand({QString(".sympath \"") + symbolPaths.join(';') + '"'});
|
runCommand({QString(".sympath \"") + symbolPaths.join(';') + '"'});
|
||||||
runCommand({".symopt+0x8000"}); // disable searching public symbol table - improving the symbol lookup speed
|
runCommand({".symopt+0x8000"}); // disable searching public symbol table - improving the symbol lookup speed
|
||||||
runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions.
|
runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions.
|
||||||
|
runCommand({"sxn 0x40010005", NoFlags}); // Do not break on Ctrl+C exceptions. QTCREATORBUG-28279
|
||||||
runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints.
|
runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints.
|
||||||
runCommand({".asm source_line", NoFlags}); // Source line in assembly
|
runCommand({".asm source_line", NoFlags}); // Source line in assembly
|
||||||
runCommand({m_extensionCommandPrefix
|
runCommand({m_extensionCommandPrefix
|
||||||
@@ -771,8 +772,6 @@ void CdbEngine::handleDoInterruptInferior(const QString &errorMessage)
|
|||||||
showMessage(errorMessage, LogError);
|
showMessage(errorMessage, LogError);
|
||||||
notifyInferiorStopFailed();
|
notifyInferiorStopFailed();
|
||||||
}
|
}
|
||||||
m_signalOperation->disconnect(this);
|
|
||||||
m_signalOperation.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
||||||
@@ -792,17 +791,6 @@ void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
|||||||
return; // we already requested a stop no need to interrupt twice
|
return; // we already requested a stop no need to interrupt twice
|
||||||
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
|
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
|
||||||
|
|
||||||
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return);
|
|
||||||
if (m_effectiveStartMode != AttachToRemoteServer && device()) {
|
|
||||||
m_signalOperation = device()->signalOperation();
|
|
||||||
if (m_signalOperation) {
|
|
||||||
connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
|
|
||||||
this, &CdbEngine::handleDoInterruptInferior);
|
|
||||||
m_signalOperation->setDebuggerCommand(runParameters().debugger.command.executable());
|
|
||||||
m_signalOperation->interruptProcess(inferiorPid());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_process.interrupt();
|
m_process.interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -179,7 +179,6 @@ private:
|
|||||||
//! Debugger accessible (expecting commands)
|
//! Debugger accessible (expecting commands)
|
||||||
bool m_accessible = false;
|
bool m_accessible = false;
|
||||||
StopMode m_stopMode = NoStopRequested;
|
StopMode m_stopMode = NoStopRequested;
|
||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
|
|
||||||
int m_nextCommandToken = 0;
|
int m_nextCommandToken = 0;
|
||||||
QHash<int, DebuggerCommand> m_commandForToken;
|
QHash<int, DebuggerCommand> m_commandForToken;
|
||||||
QString m_currentBuiltinResponse;
|
QString m_currentBuiltinResponse;
|
||||||
|
Reference in New Issue
Block a user