forked from qt-creator/qt-creator
fix shutdown paths
this includes: - move the gdb ownership back to the engine (thus strip down the adaptors as far as possible) - make gdb startup synchronous - make adapter shutdown synchronous - fix the state transitions relating to shutdown
This commit is contained in:
@@ -47,35 +47,18 @@ AbstractGdbAdapter::~AbstractGdbAdapter()
|
||||
disconnect();
|
||||
}
|
||||
|
||||
// This cannot be in the c'tor, as it would not connect the "virtual" slots
|
||||
void AbstractGdbAdapter::commonInit()
|
||||
void AbstractGdbAdapter::shutdown()
|
||||
{
|
||||
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
|
||||
connect(&m_gdbProc, SIGNAL(error(QProcess::ProcessError)),
|
||||
this, SLOT(handleGdbError(QProcess::ProcessError)));
|
||||
connect(&m_gdbProc, SIGNAL(started()),
|
||||
this, SLOT(handleGdbStarted()));
|
||||
connect(&m_gdbProc, SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||
this, SLOT(handleGdbFinished(int, QProcess::ExitStatus)));
|
||||
connect(&m_gdbProc, SIGNAL(readyReadStandardOutput()),
|
||||
this, SIGNAL(readyReadStandardOutput()));
|
||||
connect(&m_gdbProc, SIGNAL(readyReadStandardError()),
|
||||
this, SIGNAL(readyReadStandardError()));
|
||||
}
|
||||
|
||||
QByteArray AbstractGdbAdapter::readAllStandardOutput()
|
||||
const char *AbstractGdbAdapter::inferiorShutdownCommand() const
|
||||
{
|
||||
return m_gdbProc.readAllStandardOutput();
|
||||
}
|
||||
|
||||
QByteArray AbstractGdbAdapter::readAllStandardError()
|
||||
{
|
||||
return m_gdbProc.readAllStandardError();
|
||||
return "kill";
|
||||
}
|
||||
|
||||
void AbstractGdbAdapter::write(const QByteArray &data)
|
||||
{
|
||||
m_gdbProc.write(data);
|
||||
m_engine->m_gdbProc.write(data);
|
||||
}
|
||||
|
||||
bool AbstractGdbAdapter::isTrkAdapter() const
|
||||
|
||||
Reference in New Issue
Block a user