From ce5b57c8a55bba6c50d035e4e1befa79a6147ecb Mon Sep 17 00:00:00 2001 From: Pawel Polanski Date: Tue, 8 Feb 2011 15:25:20 +0100 Subject: [PATCH] Symbian: ensure that terminated application is killed --- src/plugins/debugger/gdb/codagdbadapter.cpp | 11 ++++++----- src/plugins/debugger/gdb/codagdbadapter.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/debugger/gdb/codagdbadapter.cpp b/src/plugins/debugger/gdb/codagdbadapter.cpp index 31ba90e7729..cd80161b142 100644 --- a/src/plugins/debugger/gdb/codagdbadapter.cpp +++ b/src/plugins/debugger/gdb/codagdbadapter.cpp @@ -1023,7 +1023,7 @@ void CodaGdbAdapter::startAdapter() setupTrkDeviceSignals(); codaSocket = QSharedPointer(new QTcpSocket); m_codaDevice->setDevice(codaSocket); - m_trkIODevice = codaSocket; + m_codaSocketIODevice = codaSocket; } else { m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getTcfPort(parameters.remoteChannel); bool ok = m_codaDevice && m_codaDevice->device()->isOpen(); @@ -1190,21 +1190,22 @@ void CodaGdbAdapter::cleanup() { delete m_gdbServer; m_gdbServer = 0; - if (!m_trkIODevice.isNull()) { - QAbstractSocket *socket = qobject_cast(m_trkIODevice.data()); + if (!m_codaSocketIODevice.isNull()) { + QAbstractSocket *socket = qobject_cast(m_codaSocketIODevice.data()); const bool isOpen = socket ? socket->state() == QAbstractSocket::ConnectedState - : m_trkIODevice->isOpen(); + : m_codaSocketIODevice->isOpen(); if (isOpen) { sendRunControlTerminateCommand(); //ensure process is stopped after being suspended if (socket) { socket->disconnect(); } else { - m_trkIODevice->close(); + m_codaSocketIODevice->close(); } } } //!m_trkIODevice.isNull() if (m_codaDevice) { + sendRunControlTerminateCommand(); //ensure process is stopped after being suspended disconnect(m_codaDevice.data(), 0, this, 0); SymbianUtils::SymbianDeviceManager::instance()->releaseTcfPort(m_codaDevice); } diff --git a/src/plugins/debugger/gdb/codagdbadapter.h b/src/plugins/debugger/gdb/codagdbadapter.h index 2e0b0306490..a2986b71fb1 100644 --- a/src/plugins/debugger/gdb/codagdbadapter.h +++ b/src/plugins/debugger/gdb/codagdbadapter.h @@ -147,7 +147,7 @@ private: int m_stopReason; QSharedPointer m_codaDevice; - QSharedPointer m_trkIODevice; + QSharedPointer m_codaSocketIODevice; // // Gdb