Commit 805b0a9c authored by hjk's avatar hjk
Browse files

debugger: trk log output cosmetic

parent 4880ae5b
......@@ -504,7 +504,7 @@ static inline bool overlappedSyncWrite(HANDLE file,
bool WriterThread::write(const QByteArray &data, QString *errorMessage)
{
if (verboseTrk)
qDebug() << "Write raw data: " << data.toHex();
qDebug() << "Write raw data: " << stringFromArray(data).toLatin1();
QMutexLocker locker(&m_context->mutex);
#ifdef Q_OS_WIN
DWORD charsWritten;
......@@ -1049,8 +1049,13 @@ void TrkDevice::sendTrkMessage(byte code, TrkCallback callback,
const QByteArray &data, const QVariant &cookie)
{
if (!d->writerThread.isNull()) {
if (d->verbose > 1)
qDebug() << "Sending " << code << data.toHex();
if (d->verbose > 1) {
QByteArray msg = "Sending: ";
msg += QByteArray::number(code, 16);
msg += ": ";
msg += stringFromArray(data).toLatin1();
qDebug("%s", msg.data());
}
d->writerThread->queueTrkMessage(code, callback, data, cookie);
}
}
......
......@@ -192,6 +192,7 @@ QString TrkResult::toString() const
res += QLatin1String(" [");
res += stringFromByte(token);
res += QLatin1Char(']');
res += QLatin1Char(' ');
res += stringFromArray(data);
return res;
}
......
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