forked from qt-creator/qt-creator
further cleanups in less expected shutdown paths
Reviewed-by: hjk
This commit is contained in:
@@ -285,6 +285,8 @@ void GdbEngine::initializeVariables()
|
|||||||
|
|
||||||
m_inbuffer.clear();
|
m_inbuffer.clear();
|
||||||
|
|
||||||
|
m_commandTimer->stop();
|
||||||
|
|
||||||
// ConverterState has no reset() function.
|
// ConverterState has no reset() function.
|
||||||
m_outputCodecState.~ConverterState();
|
m_outputCodecState.~ConverterState();
|
||||||
new (&m_outputCodecState) QTextCodec::ConverterState();
|
new (&m_outputCodecState) QTextCodec::ConverterState();
|
||||||
@@ -1456,6 +1458,7 @@ void GdbEngine::shutdown()
|
|||||||
case InferiorRunning:
|
case InferiorRunning:
|
||||||
case InferiorStopping:
|
case InferiorStopping:
|
||||||
case InferiorStopped:
|
case InferiorStopped:
|
||||||
|
m_commandsToRunOnTemporaryBreak.clear();
|
||||||
postCommand(_(m_gdbAdapter->inferiorShutdownCommand()),
|
postCommand(_(m_gdbAdapter->inferiorShutdownCommand()),
|
||||||
NeedsStop | LosesChild, CB(handleInferiorShutdown));
|
NeedsStop | LosesChild, CB(handleInferiorShutdown));
|
||||||
break;
|
break;
|
||||||
@@ -1496,6 +1499,7 @@ void GdbEngine::handleGdbExit(const GdbResponse &response)
|
|||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultExit) {
|
if (response.resultClass == GdbResultExit) {
|
||||||
debugMessage(_("GDB CLAIMS EXIT; WAITING"));
|
debugMessage(_("GDB CLAIMS EXIT; WAITING"));
|
||||||
|
m_commandsDoneCallback = 0;
|
||||||
// don't set state here, this will be handled in handleGdbFinished()
|
// don't set state here, this will be handled in handleGdbFinished()
|
||||||
} else {
|
} else {
|
||||||
QString msg = m_gdbAdapter->msgGdbStopFailed(_(response.data.findChild("msg").data()));
|
QString msg = m_gdbAdapter->msgGdbStopFailed(_(response.data.findChild("msg").data()));
|
||||||
|
Reference in New Issue
Block a user