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: hjk <hjk121@nokiamail.com>
This commit is contained in:
David Schulz
2014-10-15 08:15:56 +02:00
committed by hjk
parent 016d36f549
commit b4a2bd6b05
2 changed files with 14 additions and 0 deletions

View File

@@ -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)

View File

@@ -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());