tools/runonphone/symbianutils/launcher.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    41 
    41 
    42 #ifndef LAUNCHER_H
    42 #ifndef LAUNCHER_H
    43 #define LAUNCHER_H
    43 #define LAUNCHER_H
    44 
    44 
    45 #include "trkdevice.h"
    45 #include "trkdevice.h"
       
    46 #include "trkutils.h"
    46 
    47 
    47 #include <QtCore/QObject>
    48 #include <QtCore/QObject>
    48 #include <QtCore/QVariant>
    49 #include <QtCore/QVariant>
    49 #include <QtCore/QSharedPointer>
    50 #include <QtCore/QSharedPointer>
    50 
    51 
   120     static void releaseToDeviceManager(Launcher *l);
   121     static void releaseToDeviceManager(Launcher *l);
   121 
   122 
   122     // Create Trk message to start a process.
   123     // Create Trk message to start a process.
   123     static QByteArray startProcessMessage(const QString &executable,
   124     static QByteArray startProcessMessage(const QString &executable,
   124                                           const QStringList &arguments);
   125                                           const QStringList &arguments);
       
   126     // Create Trk message to read memory
       
   127     static QByteArray readMemoryMessage(uint pid, uint tid, uint from, uint len);
       
   128     static QByteArray readRegistersMessage(uint pid, uint tid);
   125     // Parse a TrkNotifyStopped message
   129     // Parse a TrkNotifyStopped message
   126     static bool parseNotifyStopped(const QByteArray &a,
   130     static bool parseNotifyStopped(const QByteArray &a,
   127                                    uint *pid, uint *tid, uint *address,
   131                                    uint *pid, uint *tid, uint *address,
   128                                    QString *why = 0);
   132                                    QString *why = 0);
   129     // Helper message
   133     // Helper message
   147     void finished();
   151     void finished();
   148     void applicationOutputReceived(const QString &output);
   152     void applicationOutputReceived(const QString &output);
   149     void copyProgress(int percent);
   153     void copyProgress(int percent);
   150     void stateChanged(int);
   154     void stateChanged(int);
   151     void processStopped(uint pc, uint pid, uint tid, const QString& reason);
   155     void processStopped(uint pc, uint pid, uint tid, const QString& reason);
       
   156     void processResumed(uint pid, uint tid);
       
   157     void libraryLoaded(const trk::Library &lib);
       
   158     void libraryUnloaded(const trk::Library &lib);
       
   159     void registersAndCallStackReadComplete(const QList<uint>& registers, const QByteArray& stack);
   152     // Emitted by the destructor, for releasing devices of SymbianDeviceManager by name
   160     // Emitted by the destructor, for releasing devices of SymbianDeviceManager by name
   153     void destroyed(const QString &serverName);
   161     void destroyed(const QString &serverName);
   154 
   162 
   155 public slots:
   163 public slots:
   156     void terminate();
   164     void terminate();
   157     void resumeProcess(uint pid, uint tid);
   165     void resumeProcess(uint pid, uint tid);
       
   166     //can be used to obtain traceback after a breakpoint / exception
       
   167     void getRegistersAndCallStack(uint pid, uint tid);
   158 
   168 
   159 private slots:
   169 private slots:
   160     void handleResult(const trk::TrkResult &data);
   170     void handleResult(const trk::TrkResult &data);
   161     void slotWaitingForTrk();
   171     void slotWaitingForTrk();
   162 
   172 
   180     void handleCreateProcess(const TrkResult &result);
   190     void handleCreateProcess(const TrkResult &result);
   181     void handleWaitForFinished(const TrkResult &result);
   191     void handleWaitForFinished(const TrkResult &result);
   182     void handleStop(const TrkResult &result);
   192     void handleStop(const TrkResult &result);
   183     void handleSupportMask(const TrkResult &result);
   193     void handleSupportMask(const TrkResult &result);
   184     void handleTrkVersion(const TrkResult &result);
   194     void handleTrkVersion(const TrkResult &result);
       
   195     void handleReadRegisters(const TrkResult &result);
       
   196     void handleReadStack(const TrkResult &result);
   185 
   197 
   186     void copyFileToRemote();
   198     void copyFileToRemote();
   187     void copyFileFromRemote();
   199     void copyFileFromRemote();
   188     void installRemotePackageSilently();
   200     void installRemotePackageSilently();
   189     void startInferiorIfNeeded();
   201     void startInferiorIfNeeded();