summaryrefslogtreecommitdiffstats
path: root/tools/runonphone/trk/launcher.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-08 10:53:28 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-08 10:53:28 (GMT)
commit2e62227f950aac8205f2b67e4d7d046836b2c799 (patch)
tree87e91115d86896949f69e8c8d993ba795422ef3b /tools/runonphone/trk/launcher.cpp
parent9b0502aa6abf6bb9c07f205bccdf2d9c65027bde (diff)
parent118e7a807d0764dee97612589fe5d7072d271e1e (diff)
downloadQt-2e62227f950aac8205f2b67e4d7d046836b2c799.zip
Qt-2e62227f950aac8205f2b67e4d7d046836b2c799.tar.gz
Qt-2e62227f950aac8205f2b67e4d7d046836b2c799.tar.bz2
Merge branch '4.6'
Conflicts: src/corelib/io/qfsfileengine.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/opengl.pro
Diffstat (limited to 'tools/runonphone/trk/launcher.cpp')
-rw-r--r--tools/runonphone/trk/launcher.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/runonphone/trk/launcher.cpp b/tools/runonphone/trk/launcher.cpp
index 90ad602..a5d173a 100644
--- a/tools/runonphone/trk/launcher.cpp
+++ b/tools/runonphone/trk/launcher.cpp
@@ -317,6 +317,18 @@ void Launcher::handleResult(const TrkResult &result)
case TrkNotifyStopped: { // Notified Stopped
logMessage(prefix + "NOTE: STOPPED " + str);
// 90 01 78 6a 40 40 00 00 07 23 00 00 07 24 00 00
+ QString reason;
+ if (result.data.size() >= 14) {
+ uint pc = extractInt(result.data.mid(0,4).constData());
+ uint pid = extractInt(result.data.mid(4,4).constData());
+ uint tid = extractInt(result.data.mid(8,4).constData());
+ ushort len = extractShort(result.data.mid(12,2).constData());
+ if(len > 0)
+ reason = result.data.mid(14, len);
+ emit(stopped(pc, pid, tid, reason));
+ } else {
+ emit(stopped(0, 0, 0, reason));
+ }
//const char *data = result.data.data();
// uint addr = extractInt(data); //code address: 4 bytes; code base address for the library
// uint pid = extractInt(data + 4); // ProcessID: 4 bytes;
@@ -692,4 +704,12 @@ void Launcher::startInferiorIfNeeded()
}
d->m_device->sendTrkMessage(TrkCreateItem, TrkCallback(this, &Launcher::handleCreateProcess), ba); // Create Item
}
+
+void Launcher::resume(uint pid, uint tid)
+{
+ QByteArray ba;
+ appendInt(&ba, pid, BigEndian);
+ appendInt(&ba, tid, BigEndian);
+ d->m_device->sendTrkMessage(TrkContinue, TrkCallback(), ba, "CONTINUE");
+}
} // namespace trk