0
|
1 |
// Copyright (c) 2007-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 "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 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@publishedPartner
|
|
19 |
@released
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef SERVER_CRASH_DATA_SOURCE_H
|
|
23 |
#define SERVER_CRASH_DATA_SOURCE_H
|
|
24 |
|
|
25 |
#include <e32std.h>
|
|
26 |
#include <e32base.h>
|
|
27 |
#include <rm_debug_api.h>
|
|
28 |
#include <crashdatasource.h>
|
|
29 |
|
|
30 |
using namespace Debug;
|
|
31 |
|
|
32 |
const TVersion KServerCrashDataSourceVersion(2,1,0);
|
|
33 |
|
|
34 |
/**
|
|
35 |
Implementation of the CCrashDataSource interface by the core dump server, which is used by
|
|
36 |
formatters to gather crash data. The data is obtained from the Debug Security Server.
|
|
37 |
@see CCrashDataSource
|
|
38 |
|
|
39 |
*/
|
|
40 |
class CServerCrashDataSource : public CCrashDataSource
|
|
41 |
{
|
|
42 |
public:
|
|
43 |
static CServerCrashDataSource *NewL(RSecuritySvrSession &aSource);
|
|
44 |
virtual ~CServerCrashDataSource();
|
|
45 |
|
|
46 |
protected:
|
|
47 |
virtual void ConstructL();
|
|
48 |
|
|
49 |
private:
|
|
50 |
CServerCrashDataSource(RSecuritySvrSession &aSource);
|
|
51 |
|
|
52 |
public:
|
|
53 |
|
|
54 |
/**
|
|
55 |
See CCrashDataSource::GetRegisterListL()
|
|
56 |
*/
|
|
57 |
virtual void GetRegisterListL( RRegisterList &aRegisterList );//const
|
|
58 |
|
|
59 |
/**
|
|
60 |
See CCrashDataSource::ReadRegistersL()
|
|
61 |
*/
|
|
62 |
virtual void ReadRegistersL( const TUint64 aThreadId, RRegisterList &aRegisterList );
|
|
63 |
|
|
64 |
/**
|
|
65 |
See CCrashDataSource::ReadMemoryL()
|
|
66 |
*/
|
|
67 |
virtual void ReadMemoryL(
|
|
68 |
const TUint64 aThreadId,
|
|
69 |
const TUint32 aAddress,
|
|
70 |
const TUint32 aLength,
|
|
71 |
TDes8 & aData );
|
|
72 |
|
|
73 |
/**
|
|
74 |
See CCrashDataSource::GetProcessListL()
|
|
75 |
*/
|
|
76 |
virtual void GetProcessListL( RProcessPointerList & aData,
|
|
77 |
TUint & aTotalProcessListDescSize );
|
|
78 |
|
|
79 |
/**
|
|
80 |
See CCrashDataSource::GetExecutableListL()
|
|
81 |
*/
|
|
82 |
virtual void GetExecutableListL( RExecutablePointerList & aData,
|
|
83 |
TUint & aTotalExecutableListDescSize );
|
|
84 |
|
|
85 |
/**
|
|
86 |
See CCrashDataSource::GetThreadListL()
|
|
87 |
*/
|
|
88 |
virtual void GetThreadListL( const TUint64 aProcessId,
|
|
89 |
RThreadPointerList & aThreadList,
|
|
90 |
TUint & aTotalThreadListDescSize );
|
|
91 |
|
|
92 |
/**
|
|
93 |
See CCrashDataSource::GetCodeSegmentsL()
|
|
94 |
*/
|
|
95 |
virtual void GetCodeSegmentsL(const TUint64 aTid, RCodeSegPointerList &aCodeSegs, TUint &aTotalCodeSegListDescSize);
|
|
96 |
|
|
97 |
/**
|
|
98 |
* @see CCrashDataSource::ReadTraceBufferL
|
|
99 |
*/
|
|
100 |
virtual void ReadTraceBufferL(TDes8 &aTraceData, TUint aPos = 0);
|
|
101 |
|
|
102 |
/**
|
|
103 |
* @see CCrashDataSource::GetAvailableTraceSizeL
|
|
104 |
*/
|
|
105 |
virtual TUint GetAvailableTraceSizeL();
|
|
106 |
|
|
107 |
/**
|
|
108 |
* @see CCrashDataSource::GetLocksL
|
|
109 |
*/
|
|
110 |
virtual void GetLocksL(TSCMLockData& aLockData);
|
|
111 |
|
|
112 |
/**
|
|
113 |
* @see CCrashDataSource::GetROMBuildInfoL
|
|
114 |
*/
|
|
115 |
virtual void GetROMBuildInfoL(TRomHeaderData& aRomHeader);
|
|
116 |
|
|
117 |
/**
|
|
118 |
* @see CCrashDataSource::GetExceptionStackSizeL
|
|
119 |
*/
|
|
120 |
virtual TUint GetExceptionStackSizeL(const Debug::TArmProcessorModes aMode);
|
|
121 |
|
|
122 |
/**
|
|
123 |
* @see CCrashDataSource::GetExceptionStackL
|
|
124 |
*/
|
|
125 |
virtual void GetExceptionStackL(const Debug::TArmProcessorModes aMode, TDes8& aStack, TUint aStartReadPoint);
|
|
126 |
|
|
127 |
/**
|
|
128 |
* @see CCrashDataSource::GetVersion
|
|
129 |
*/
|
|
130 |
virtual TVersion GetVersion() const;
|
|
131 |
|
|
132 |
/**
|
|
133 |
* @see CCrashDataSource::GetDataSourceFunctionalityBufSize
|
|
134 |
*/
|
|
135 |
virtual TInt GetDataSourceFunctionalityBufSize(TUint& aBufSize);
|
|
136 |
|
|
137 |
/**
|
|
138 |
* @see CCrashDataSource::GetDataSourceFunctionality
|
|
139 |
*/
|
|
140 |
virtual TInt GetDataSourceFunctionality(TDes8& aFuncBuffer);
|
|
141 |
|
|
142 |
/**
|
|
143 |
* @see CCrashDataSource::GetVariantSpecificDataSizeL
|
|
144 |
*/
|
|
145 |
virtual TInt GetVariantSpecificDataSize(TUint& aDataSize);
|
|
146 |
|
|
147 |
/**
|
|
148 |
* @see CCrashDataSource::GetVariantSepcificDataL
|
|
149 |
*/
|
|
150 |
virtual TInt GetVariantSpecificData(TDes8 &aVarSpecData);
|
|
151 |
|
|
152 |
private:
|
|
153 |
void SetRegValuesL( const TUint64 aThreadId, RRegisterList & aRegisterList );
|
|
154 |
|
|
155 |
void PrintRegs( RRegisterList & aRegisterList );
|
|
156 |
|
|
157 |
enum TListLevel
|
|
158 |
{
|
|
159 |
EListGlobal,
|
|
160 |
EListThread,
|
|
161 |
EListProcess
|
|
162 |
};
|
|
163 |
|
|
164 |
void DoGetListL( const TListId aListId,
|
|
165 |
const TThreadId aThreadId,
|
|
166 |
const TProcessId aProcessId,
|
|
167 |
RBuf8 & aBuffer,
|
|
168 |
TUint32 & aSize );
|
|
169 |
|
|
170 |
TTagHeader * GetDebugHeader( const TTagHeaderId aTagHdrId, const TDesC8 &aDFBlock );
|
|
171 |
TTag* GetTag(const TTagHeader* aTagHdr, const TInt aElement);
|
|
172 |
|
|
173 |
private:
|
|
174 |
RSecuritySvrSession &iSecSess;
|
|
175 |
|
|
176 |
RRegisterList iRegisterList;
|
|
177 |
RBuf8 iThreadListBuffer;
|
|
178 |
RBuf8 iProcListBuffer;
|
|
179 |
RBuf8 iExecutableListBuffer;
|
|
180 |
|
|
181 |
TUint32 iLastThreadListSize;
|
|
182 |
TUint32 iLastProcListSize;
|
|
183 |
TUint32 iLastExecutableListSize;
|
|
184 |
TUint32 iLastRegListSize;
|
|
185 |
TUint32 iMaxMemReadSize;
|
|
186 |
|
|
187 |
TUint32 iSpare0;
|
|
188 |
TUint32 iSpare1;
|
|
189 |
TUint32 iSpare2;
|
|
190 |
TUint32 iSpare3;
|
|
191 |
|
|
192 |
};
|
|
193 |
|
|
194 |
#endif // TEST_CRASH_DATA_SOURCE_H
|