Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/runonphone/symbianutils/trkutils.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4444
    4545#include "symbianutils_global.h"
     46
    4647#include <QtCore/QByteArray>
    4748#include <QtCore/QHash>
     
    5657
    5758typedef unsigned char byte;
     59struct TrkResult;
    5860
    5961enum Command {
     62    //meta commands
    6063    TrkPing = 0x00,
    6164    TrkConnect = 0x01,
    6265    TrkDisconnect = 0x02,
     66    TrkReset = 0x03,
    6367    TrkVersions = 0x04,
    6468    TrkSupported = 0x05,
    6569    TrkCpuType = 0x06,
     70    TrkConfigTransport = 0x07,
     71    TrkVersions2 = 0x08,
    6672    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
    6784    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
    6897    TrkCreateItem = 0x40,
    6998    TrkDeleteItem = 0x41,
     99    TrkReadInfo = 0x42,
     100    TrkWriteInfo = 0x43,
    70101
    71102    TrkWriteFile = 0x48,
     103    TrkReadFile = 0x49,
    72104    TrkOpenFile = 0x4a,
    73105    TrkCloseFile = 0x4b,
     106    TrkPositionFile = 0x4c,
    74107    TrkInstallFile = 0x4d,
    75108    TrkInstallFile2 = 0x4e,
    76109
     110    TrkPhoneSwVersion = 0x4f,
     111    TrkPhoneName = 0x50,
     112    TrkVersions3 = 0x51,
     113
     114    //replies
    77115    TrkNotifyAck = 0x80,
    78116    TrkNotifyNak = 0xff,
     117
     118    //target -> host notification
    79119    TrkNotifyStopped = 0x90,
    80120    TrkNotifyException = 0x91,
    81121    TrkNotifyInternalError = 0x92,
     122    TrkNotifyStopped2 = 0x94,
     123
     124    //target -> host OS notification
    82125    TrkNotifyCreated = 0xa0,
    83126    TrkNotifyDeleted = 0xa1,
    84127    TrkNotifyProcessorStarted = 0xa2,
    85128    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
     139enum 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
     153enum SerialMultiplexor {
     154    MuxRaw = 0,
     155    MuxTextTrace = 0x0102,
     156    MuxTrk = 0x0190
    87157};
    88158
     
    90160SYMBIANUTILS_EXPORT ushort extractShort(const char *data);
    91161SYMBIANUTILS_EXPORT uint extractInt(const char *data);
     162SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data);
    92163
    93164SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba);
     
    109180struct SYMBIANUTILS_EXPORT Library
    110181{
    111     Library() {}
     182    Library();
     183    explicit Library(const TrkResult &r);
    112184
    113185    QByteArray name;
    114186    uint codeseg;
    115187    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;
    116190};
    117191
     
    119193{
    120194    TrkAppVersion();
    121     void reset();   
     195    void reset();
    122196
    123197    int trkMajor;
     
    132206    void reset();
    133207    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;
    134213
    135214    // Trk feedback
     
    143222    TrkAppVersion trkAppVersion;
    144223    uint pid;
     224    uint mainTid;
    145225    uint tid;
    146226    uint codeseg;
     
    151231    Libraries libraries;
    152232
    153     typedef uint Thread;
    154     typedef QList<Thread> Threads;
    155     Threads threads;
    156 
    157233    // Gdb request
    158     uint currentThread;
    159234    QStringList modules;
    160235};
     
    169244    QString errorString() const;
    170245
     246    ushort multiplex;
    171247    byte code;
    172248    byte token;
Note: See TracChangeset for help on using the changeset viewer.