Commit b4a2bd6b authored by David Schulz's avatar David Schulz Committed by hjk

CDB: Make it possible to kill the cdb...

...when the cdb got hung up.

Handle abort like in almost any debugger engine, first kindly
ask to quit. If this doesn't work kill the debugger process.

Task-number: QTCREATORBUG-13173
Change-Id: I1ddc98b1ffe00342c96d104c16099b500e52bc07
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 016d36f5
......@@ -954,6 +954,19 @@ void CdbEngine::shutdownEngine()
interruptInferior();
}
void CdbEngine::abortDebugger()
{
if (targetState() == DebuggerFinished) {
// We already tried. Try harder.
showMessage(QLatin1String("ABORTING DEBUGGER. SECOND TIME."));
m_process.kill();
} else {
// Be friendly the first time. This will change targetState().
showMessage(QLatin1String("ABORTING DEBUGGER. FIRST TIME."));
quitDebugger();
}
}
void CdbEngine::processFinished()
{
if (debug)
......
......@@ -84,6 +84,7 @@ public:
virtual void runEngine();
virtual void shutdownInferior();
virtual void shutdownEngine();
virtual void abortDebugger();
virtual void detachDebugger();
virtual void updateWatchData(const WatchData &data,
const WatchUpdateFlags & flags = WatchUpdateFlags());
......
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