debugger: work on handling gdb crashes gracefully

This commit is contained in:
hjk
2009-09-25 11:06:51 +02:00
parent 978cf4bda8
commit 00f676708b
13 changed files with 93 additions and 68 deletions

View File

@@ -57,7 +57,7 @@ RemoteGdbAdapter::RemoteGdbAdapter(GdbEngine *engine, QObject *parent)
{
QTC_ASSERT(state() == DebuggerNotReady, qDebug() << state());
connect(&m_gdbProc, SIGNAL(error(QProcess::ProcessError)),
this, SIGNAL(error(QProcess::ProcessError)));
this, SLOT(handleGdbError(QProcess::ProcessError)));
connect(&m_gdbProc, SIGNAL(readyReadStandardOutput()),
this, SIGNAL(readyReadStandardOutput()));
connect(&m_gdbProc, SIGNAL(readyReadStandardError()),
@@ -124,6 +124,13 @@ void RemoteGdbAdapter::handleGdbStarted()
emit adapterStarted();
}
void RemoteGdbAdapter::handleGdbError(QProcess::ProcessError error)
{
debugMessage(_("ADAPTER, HANDLE GDB ERROR"));
emit adapterCrashed(m_engine->errorMessage(error));
shutdown();
}
void RemoteGdbAdapter::uploadProcError(QProcess::ProcessError error)
{
QString msg;