Commit 9f7966d3 authored by hjk's avatar hjk

debugger: rename gdb{In,Out}putAvailable to showDebugger{In,Out}put

parent 8494afba
......@@ -158,7 +158,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
// Avoid endless loops created by faulty dumpers.
QByteArray processedName = QByteArray::number(dumpChildren) + '-' + data.iname;
if (m_processedNames.contains(processedName)) {
gdbInputAvailable(LogStatus,
showDebuggerInput(LogStatus,
_("<Breaking endless loop for " + data.iname + '>'));
data.setAllUnneeded();
data.setValue(_("<unavailable>"));
......
......@@ -331,7 +331,7 @@ void GdbEngine::readDebugeeOutput(const QByteArray &data)
void GdbEngine::debugMessage(const QString &msg)
{
gdbOutputAvailable(LogDebug, msg);
showDebuggerOutput(LogDebug, msg);
}
void GdbEngine::handleResponse(const QByteArray &buff)
......@@ -339,8 +339,8 @@ void GdbEngine::handleResponse(const QByteArray &buff)
static QTime lastTime;
if (theDebuggerBoolSetting(LogTimeStamps))
gdbOutputAvailable(LogTime, currentTime());
gdbOutputAvailable(LogOutput, QString::fromLocal8Bit(buff, buff.length()));
showDebuggerOutput(LogTime, currentTime());
showDebuggerOutput(LogOutput, QString::fromLocal8Bit(buff, buff.length()));
#if 0
qDebug() // << "#### start response handling #### "
......@@ -776,7 +776,7 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
{
GdbCommand cmd = cmd0;
if (state() == DebuggerNotReady) {
gdbInputAvailable(LogInput, _(cmd.command));
showDebuggerInput(LogInput, _(cmd.command));
debugMessage(_("GDB PROCESS NOT RUNNING, PLAIN CMD IGNORED: " + cmd.command));
return;
}
......@@ -785,7 +785,7 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
cmd.postTime = QTime::currentTime();
m_cookieForToken[currentToken()] = cmd;
cmd.command = QByteArray::number(currentToken()) + cmd.command;
gdbInputAvailable(LogInput, _(cmd.command));
showDebuggerInput(LogInput, _(cmd.command));
m_gdbAdapter->write(cmd.command + "\r\n");
......@@ -910,7 +910,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
GdbCommand cmd = m_cookieForToken.take(token);
if (theDebuggerBoolSetting(LogTimeStamps)) {
gdbOutputAvailable(LogTime, _("Response time: %1: %2 s")
showDebuggerOutput(LogTime, _("Response time: %1: %2 s")
.arg(_(cmd.command))
.arg(cmd.postTime.msecsTo(QTime::currentTime()) / 1000.));
}
......@@ -1916,9 +1916,9 @@ void GdbEngine::setTokenBarrier()
);
}
PENDING_DEBUG("\n--- token barrier ---\n");
gdbInputAvailable(LogMisc, _("--- token barrier ---"));
showDebuggerInput(LogMisc, _("--- token barrier ---"));
if (theDebuggerBoolSetting(LogTimeStamps))
gdbInputAvailable(LogMisc, currentTime());
showDebuggerInput(LogMisc, currentTime());
m_oldestAcceptableToken = currentToken();
}
......@@ -3129,7 +3129,7 @@ void GdbEngine::updateWatchData(const WatchData &data)
//qDebug() << "PROCESSED NAMES: " << processedName << m_processedNames;
if (m_processedNames.contains(processedName)) {
WatchData data1 = data;
gdbInputAvailable(LogStatus,
showDebuggerInput(LogStatus,
_("<Breaking endless loop for " + data.iname + '>'));
data1.setAllUnneeded();
data1.setValue(_("<unavailable>"));
......@@ -3181,8 +3181,8 @@ void GdbEngine::rebuildModel()
m_processedNames.clear();
PENDING_DEBUG("REBUILDING MODEL" << count);
if (theDebuggerBoolSetting(LogTimeStamps))
gdbInputAvailable(LogMisc, currentTime());
gdbInputAvailable(LogStatus, _("<Rebuild Watchmodel %1>").arg(count));
showDebuggerInput(LogMisc, currentTime());
showDebuggerInput(LogStatus, _("<Rebuild Watchmodel %1>").arg(count));
showStatusMessage(tr("Finished retrieving data."), 400);
manager()->watchHandler()->endCycle();
showToolTip();
......@@ -3210,7 +3210,7 @@ void GdbEngine::sendWatchParameters(const QByteArray &params0)
const QByteArray inBufferCmd = arrayFillCommand("qDumpInBuffer", params);
params.replace('\0','!');
gdbInputAvailable(LogMisc, QString::fromUtf8(params));
showDebuggerInput(LogMisc, QString::fromUtf8(params));
params.clear();
params.append('\0');
......
......@@ -136,10 +136,10 @@ private: ////////// Gdb Process Management //////////
void handleInferiorShutdown(const GdbResponse &response);
void handleGdbExit(const GdbResponse &response);
void gdbInputAvailable(int channel, const QString &msg)
{ m_manager->showDebuggerInput(channel, msg); }
void gdbOutputAvailable(int channel, const QString &msg)
{ m_manager->showDebuggerOutput(channel, msg); }
void showDebuggerInput(int channel, const QString &msg)
{ m_manager->showDebuggerInput(channel, msg); }
void showDebuggerOutput(int channel, const QString &msg)
{ m_manager->showDebuggerOutput(channel, msg); }
private slots:
void handleGdbFinished(int, QProcess::ExitStatus status);
......
......@@ -142,13 +142,13 @@ void RemoteGdbAdapter::uploadProcError(QProcess::ProcessError error)
void RemoteGdbAdapter::readUploadStandardOutput()
{
QByteArray ba = m_uploadProc.readAllStandardOutput();
m_engine->gdbOutputAvailable(LogOutput, QString::fromLocal8Bit(ba, ba.length()));
m_engine->showDebuggerOutput(LogOutput, QString::fromLocal8Bit(ba, ba.length()));
}
void RemoteGdbAdapter::readUploadStandardError()
{
QByteArray ba = m_uploadProc.readAllStandardError();
m_engine->gdbOutputAvailable(LogError, QString::fromLocal8Bit(ba, ba.length()));
m_engine->showDebuggerOutput(LogError, QString::fromLocal8Bit(ba, ba.length()));
}
void RemoteGdbAdapter::startInferior()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment