diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-05-11 12:34:37 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-05-11 12:37:01 (GMT) |
commit | fffb09adfd07eef5d2f296374b507032eec06cad (patch) | |
tree | fda6192ad0556c9e282919807a9ba6000237ad44 /tools/runonphone/symbianutils/launcher.cpp | |
parent | 05399347ed467693d45009c6ba659746ea492231 (diff) | |
download | Qt-fffb09adfd07eef5d2f296374b507032eec06cad.zip Qt-fffb09adfd07eef5d2f296374b507032eec06cad.tar.gz Qt-fffb09adfd07eef5d2f296374b507032eec06cad.tar.bz2 |
Symbian/trk: Fix debugging output for the N8.
1. Fix hanging behaviour when we receive a message on the wrong mux in
framed mode
2. Treat messages on the trace mux (0102) as debug output
3. Separate timestamp from text in trace messages
Reviewed-by: Friedemann Kleint
Diffstat (limited to 'tools/runonphone/symbianutils/launcher.cpp')
-rw-r--r-- | tools/runonphone/symbianutils/launcher.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp index fa509e7..ecb067e 100644 --- a/tools/runonphone/symbianutils/launcher.cpp +++ b/tools/runonphone/symbianutils/launcher.cpp @@ -365,8 +365,22 @@ void Launcher::handleResult(const TrkResult &result) QByteArray prefix = "READ BUF: "; QByteArray str = result.toString().toUtf8(); if (result.isDebugOutput) { // handle application output - logMessage("APPLICATION OUTPUT: " + result.data); - emit applicationOutputReceived(result.data); + QString msg; + if (result.multiplex == MuxTextTrace) { + if (result.data.length() > 8) { + quint64 timestamp = extractInt64(result.data) & 0x0FFFFFFFFFFFFFFFULL; + quint64 secs = timestamp / 1000000000; + quint64 ns = timestamp % 1000000000; + msg = QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.data.mid(8))); + logMessage("TEXT TRACE: " + msg); + } + } else { + logMessage("APPLICATION OUTPUT: " + result.data); + msg = result.data; + } + msg.replace("\r\n", "\n"); + if(!msg.endsWith('\n')) msg.append('\n'); + emit applicationOutputReceived(msg); return; } switch (result.code) { |