forked from qt-creator/qt-creator
Debugger: Provide way to process debuggee output further
Output coming from the debuggee was limited to be printed inside the DebuggerLog and the Application Output pane, but the output might be useful to process differently or even additionally to the default logging. Provide functionality to be able to add an output processor. Change-Id: I715b90b28c64d3cf95bcc2a047a5aba1a56d1058 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -550,16 +550,6 @@ void DebuggerEngine::setRegisterValue(const QString &name, const QString &value)
|
||||
Q_UNUSED(value);
|
||||
}
|
||||
|
||||
static Utils::OutputFormat outputFormatForChannelType(int channel)
|
||||
{
|
||||
switch (channel) {
|
||||
case AppOutput: return Utils::StdOutFormatSameLine;
|
||||
case AppError: return Utils::StdErrFormatSameLine;
|
||||
case AppStuff: return Utils::DebugFormat;
|
||||
default: return Utils::NumberOfFormats;
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerEngine::showMessage(const QString &msg, int channel, int timeout) const
|
||||
{
|
||||
if (d->m_masterEngine) {
|
||||
@@ -577,7 +567,7 @@ void DebuggerEngine::showMessage(const QString &msg, int channel, int timeout) c
|
||||
case AppError:
|
||||
case AppStuff:
|
||||
if (d->m_runControl)
|
||||
d->m_runControl->appendMessage(msg, outputFormatForChannelType(channel));
|
||||
d->m_runControl->handleApplicationOutput(msg, channel);
|
||||
else
|
||||
qWarning("Warning: %s (no active run control)", qPrintable(msg));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user