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