forked from qt-creator/qt-creator
debugger: work on handling gdb crashes gracefully
This commit is contained in:
@@ -56,7 +56,7 @@ AttachGdbAdapter::AttachGdbAdapter(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()),
|
||||
@@ -100,6 +100,13 @@ void AttachGdbAdapter::handleGdbStarted()
|
||||
emit adapterStarted();
|
||||
}
|
||||
|
||||
void AttachGdbAdapter::handleGdbError(QProcess::ProcessError error)
|
||||
{
|
||||
debugMessage(_("PLAIN ADAPTER, HANDLE GDB ERROR"));
|
||||
emit adapterCrashed(m_engine->errorMessage(error));
|
||||
shutdown();
|
||||
}
|
||||
|
||||
void AttachGdbAdapter::prepareInferior()
|
||||
{
|
||||
QTC_ASSERT(state() == AdapterStarted, qDebug() << state());
|
||||
|
||||
Reference in New Issue
Block a user