Separated child-process stdout/stderr, and seperated "our" output/errors.

So now the "Applciation Output" can distinguish between these four, and
handle them appropriately.
This commit is contained in:
Erik Verbruggen
2010-04-19 14:21:33 +02:00
parent 53425816af
commit e3bceff3ee
36 changed files with 223 additions and 189 deletions

View File

@@ -329,8 +329,8 @@ static void dump(const char *first, const char *middle, const QString & to)
void GdbEngine::readDebugeeOutput(const QByteArray &data)
{
m_manager->showApplicationOutput(m_outputCodec->toUnicode(
data.constData(), data.length(), &m_outputCodecState));
m_manager->messageAvailable(m_outputCodec->toUnicode(
data.constData(), data.length(), &m_outputCodecState), true);
}
void GdbEngine::debugMessage(const QString &msg)
@@ -541,7 +541,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
// On Windows, the contents seem to depend on the debugger
// version and/or OS version used.
if (data.startsWith("warning:"))
manager()->showApplicationOutput(_(data.mid(9))); // cut "warning: "
manager()->messageAvailable(_(data.mid(9)), true); // cut "warning: "
break;
}

View File

@@ -59,7 +59,7 @@ TermGdbAdapter::TermGdbAdapter(GdbEngine *engine, QObject *parent)
m_stubProc.setSettings(Core::ICore::instance()->settings());
#endif
connect(&m_stubProc, SIGNAL(processError(QString)), SLOT(stubError(QString)));
connect(&m_stubProc, SIGNAL(processMessage(QString, bool)), SLOT(stubMessage(QString, bool)));
connect(&m_stubProc, SIGNAL(processStarted()), SLOT(handleInferiorStarted()));
connect(&m_stubProc, SIGNAL(wrapperStopped()), SLOT(stubExited()));
}
@@ -165,7 +165,7 @@ void TermGdbAdapter::interruptInferior()
debugMessage(_("CANNOT INTERRUPT %1").arg(attachedPID));
}
void TermGdbAdapter::stubError(const QString &msg)
void TermGdbAdapter::stubMessage(const QString &msg, bool)
{
showMessageBox(QMessageBox::Critical, tr("Debugger Error"), msg);
}

View File

@@ -66,7 +66,7 @@ private:
Q_SLOT void handleInferiorStarted();
Q_SLOT void stubExited();
Q_SLOT void stubError(const QString &msg);
Q_SLOT void stubMessage(const QString &msg, bool isError);
Utils::ConsoleProcess m_stubProc;
};