Changeset 846 for trunk/tools/runonphone/symbianutils/trkutils.h
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/runonphone/symbianutils/trkutils.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 45 45 #include "symbianutils_global.h" 46 46 47 #include <QtCore/QByteArray> 47 48 #include <QtCore/QHash> … … 56 57 57 58 typedef unsigned char byte; 59 struct TrkResult; 58 60 59 61 enum Command { 62 //meta commands 60 63 TrkPing = 0x00, 61 64 TrkConnect = 0x01, 62 65 TrkDisconnect = 0x02, 66 TrkReset = 0x03, 63 67 TrkVersions = 0x04, 64 68 TrkSupported = 0x05, 65 69 TrkCpuType = 0x06, 70 TrkConfigTransport = 0x07, 71 TrkVersions2 = 0x08, 66 72 TrkHostVersions = 0x09, 73 74 //state commands 75 TrkReadMemory = 0x10, 76 TrkWriteMemory = 0x11, 77 TrkReadRegisters = 0x12, 78 TrkWriteRegisters = 0x13, 79 TrkFillMemory = 0x14, 80 TrkCopyMemory = 0x15, 81 TrkFlushCache = 0x16, 82 83 //execution commands 67 84 TrkContinue = 0x18, 85 TrkStep = 0x19, 86 TrkStop = 0x1a, 87 TrkSetBreak = 0x1b, 88 TrkClearBreak = 0x1c, 89 TrkDownload = 0x1d, 90 TrkModifyBreakThread = 0x1e, 91 92 //host -> target IO management 93 TrkNotifyFileInput = 0x20, 94 TrkBlockFileIo = 0x21, 95 96 //host -> target os commands 68 97 TrkCreateItem = 0x40, 69 98 TrkDeleteItem = 0x41, 99 TrkReadInfo = 0x42, 100 TrkWriteInfo = 0x43, 70 101 71 102 TrkWriteFile = 0x48, 103 TrkReadFile = 0x49, 72 104 TrkOpenFile = 0x4a, 73 105 TrkCloseFile = 0x4b, 106 TrkPositionFile = 0x4c, 74 107 TrkInstallFile = 0x4d, 75 108 TrkInstallFile2 = 0x4e, 76 109 110 TrkPhoneSwVersion = 0x4f, 111 TrkPhoneName = 0x50, 112 TrkVersions3 = 0x51, 113 114 //replies 77 115 TrkNotifyAck = 0x80, 78 116 TrkNotifyNak = 0xff, 117 118 //target -> host notification 79 119 TrkNotifyStopped = 0x90, 80 120 TrkNotifyException = 0x91, 81 121 TrkNotifyInternalError = 0x92, 122 TrkNotifyStopped2 = 0x94, 123 124 //target -> host OS notification 82 125 TrkNotifyCreated = 0xa0, 83 126 TrkNotifyDeleted = 0xa1, 84 127 TrkNotifyProcessorStarted = 0xa2, 85 128 TrkNotifyProcessorStandBy = 0xa6, 86 TrkNotifyProcessorReset = 0xa7 129 TrkNotifyProcessorReset = 0xa7, 130 131 //target -> host support commands (these are defined but not implemented in TRK) 132 TrkDSWriteFile = 0xd0, 133 TrkDSReadFile = 0xd1, 134 TrkDSOpenFile = 0xd2, 135 TrkDSCloseFile = 0xd3, 136 TrkDSPositionFile = 0xd4 137 }; 138 139 enum DSOSItemTypes { 140 kDSOSProcessItem = 0x0000, 141 kDSOSThreadItem = 0x0001, 142 kDSOSDLLItem = 0x0002, 143 kDSOSAppItem = 0x0003, 144 kDSOSMemBlockItem = 0x0004, 145 kDSOSProcAttachItem = 0x0005, 146 kDSOSThreadAttachItem = 0x0006, 147 kDSOSProcAttach2Item = 0x0007, 148 kDSOSProcRunItem = 0x0008, 149 /* 0x0009 - 0x00ff reserved for general expansion */ 150 /* 0x0100 - 0xffff available for target-specific use */ 151 }; 152 153 enum SerialMultiplexor { 154 MuxRaw = 0, 155 MuxTextTrace = 0x0102, 156 MuxTrk = 0x0190 87 157 }; 88 158 … … 90 160 SYMBIANUTILS_EXPORT ushort extractShort(const char *data); 91 161 SYMBIANUTILS_EXPORT uint extractInt(const char *data); 162 SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data); 92 163 93 164 SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); … … 109 180 struct SYMBIANUTILS_EXPORT Library 110 181 { 111 Library() {} 182 Library(); 183 explicit Library(const TrkResult &r); 112 184 113 185 QByteArray name; 114 186 uint codeseg; 115 187 uint dataseg; 188 //library addresses are valid for a given process (depending on memory model, they might be loaded at the same address in all processes or not) 189 uint pid; 116 190 }; 117 191 … … 119 193 { 120 194 TrkAppVersion(); 121 void reset(); 195 void reset(); 122 196 123 197 int trkMajor; … … 132 206 void reset(); 133 207 QString deviceDescription(unsigned verbose) const; 208 QString toString() const; 209 // Answer to qXfer::libraries 210 QByteArray gdbLibraryList() const; 211 // Answer to qsDllInfo, can be sent chunk-wise. 212 QByteArray gdbQsDllInfo(int start = 0, int count = -1) const; 134 213 135 214 // Trk feedback … … 143 222 TrkAppVersion trkAppVersion; 144 223 uint pid; 224 uint mainTid; 145 225 uint tid; 146 226 uint codeseg; … … 151 231 Libraries libraries; 152 232 153 typedef uint Thread;154 typedef QList<Thread> Threads;155 Threads threads;156 157 233 // Gdb request 158 uint currentThread;159 234 QStringList modules; 160 235 }; … … 169 244 QString errorString() const; 170 245 246 ushort multiplex; 171 247 byte code; 172 248 byte token;
Note:
See TracChangeset
for help on using the changeset viewer.