0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// t_rmdebugclient.h
|
|
15 |
// Definitions for the run mode debug agent client side sessions.
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#ifndef RMDEBUGCLIENT_H
|
|
20 |
#define RMDEBUGCLIENT_H
|
|
21 |
|
|
22 |
class TProcessInfo
|
|
23 |
{
|
|
24 |
public:
|
|
25 |
TUint iProcessID;
|
|
26 |
TInt iAttributes;
|
|
27 |
TUint32 iPriority;
|
|
28 |
TBuf<KMaxName> iName;
|
|
29 |
};
|
|
30 |
|
|
31 |
class TThreadInfo
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
TUint iThreadID;
|
|
35 |
TUint8 iPriority;
|
|
36 |
TUint8 iThreadType;
|
|
37 |
TBuf<KMaxName> iName;
|
|
38 |
TUint iOwningProcessID;
|
|
39 |
|
|
40 |
// Probably would want a state element here, under debug control, stopped etc
|
|
41 |
// such that additional information could be provided which was only valid for
|
|
42 |
// stopped threads.
|
|
43 |
|
|
44 |
};
|
|
45 |
|
|
46 |
class TExecReq
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
TUint32 iRequest; // Step, Step into, step threads
|
|
50 |
TUint32 iStartAddress;
|
|
51 |
TUint32 iStopAddress;
|
|
52 |
|
|
53 |
};
|
|
54 |
|
|
55 |
class TMemoryInfo
|
|
56 |
{
|
|
57 |
public:
|
|
58 |
TUint32 iAddress;
|
|
59 |
TUint32 iSize;
|
|
60 |
TPtr8* iDataPtr;
|
|
61 |
};
|
|
62 |
|
|
63 |
|
|
64 |
// Client Side session
|
|
65 |
class RDebugServSession : public RSessionBase
|
|
66 |
{
|
|
67 |
public:
|
|
68 |
RDebugServSession();
|
|
69 |
TVersion Version() const;
|
|
70 |
|
|
71 |
TInt Open();
|
|
72 |
TInt Close();
|
|
73 |
|
|
74 |
TInt ReadMemory(const TUint32 aThreadId, TMemoryInfo* aInfo);
|
|
75 |
TInt WriteMemory(const TUint32 aThreadId, TMemoryInfo* aInfo);
|
|
76 |
|
|
77 |
// TInt ReadThreadInfo(const TInt aIndex, const TInt aOwningProc, TThreadInfo* aInfo);
|
|
78 |
// TInt ReadProcessInfo(const TInt aIndex, TProcessInfo* aInfo);
|
|
79 |
TInt SuspendThread(const TInt ThreadID);
|
|
80 |
TInt ResumeThread(const TInt ThreadID);
|
|
81 |
|
|
82 |
private:
|
|
83 |
RThread iServerThread;
|
|
84 |
};
|
|
85 |
|
|
86 |
// Function codes (opcodes) used in message passing between client and server
|
|
87 |
enum TDebugServRqst
|
|
88 |
{
|
|
89 |
EDebugServOpen = 1,
|
|
90 |
EDebugServClose,
|
|
91 |
|
|
92 |
EDebugServSuspendThread,
|
|
93 |
EDebugServResumeThread,
|
|
94 |
// EDebugServReadProcessInfo,
|
|
95 |
// EDebugServReadThreadInfo,
|
|
96 |
EDebugServReadMemory,
|
|
97 |
EDebugServWriteMemory,
|
|
98 |
};
|
|
99 |
|
|
100 |
#endif // RMDEBUGCLIENT_H
|