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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Definition of Data Source API that supplies crash information.
26 #ifndef CRASH_DATA_SOURCE_H
27 #define CRASH_DATA_SOURCE_H
32 #include <crashdata.h>
33 #include <processdata.h>
34 #include <executabledata.h>
35 #include <threaddata.h>
39 Definition of the Data Source API. This API is used by formatters to obtain crash data from
40 the Core Dump Server. The Core Dump Server derives and implements this API.
42 class CCrashDataSource : public CBase
46 /** Standard second-phase constructor. */
47 virtual void ConstructL() = 0;
52 This call returns information on all available registers. It does not
53 return the register contents. This is used to establish which registers
54 a caller could ask for, in particular for Co Processor registers.
55 The callee (not the caller) allocates aRegisterList.
56 This method is used by a formatter to establish which registers it can ask for,
57 and thus need only be called once per session.
59 @param aRegisterList Returned register list with available registers.
64 virtual void GetRegisterListL( RRegisterList & aRegisterList ) = 0;
67 Ask the Core Dump server for some register data. The caller allocates
68 the array and fills in the details of the registers for which it would like
70 @param aThreadId Thread to read registers from.
71 @param aRegisterList Returned register list with current values.
74 @see GetRegisterListL().
77 virtual void ReadRegistersL( const TUint64 aThreadId, RRegisterList &aRegisterList ) = 0;
80 Read data from target relative to a particular thread.
81 The caller assumes ownership of the resulting data descriptor.
83 @param aThreadId Memory read is relative to this thread parameter
84 @param aAddress Virtual address to read from
85 @param aLength Number of bytes to read
86 @param aData Descriptor for read data
88 virtual void ReadMemoryL(
89 const TUint64 aThreadId,
90 const TUint32 aAddress,
91 const TUint32 aLength,
96 Read the current process list.
97 The caller assumes ownership of resulting data.
98 @param aData Array of currently running processes .
100 @see RProcessPointerList.
103 virtual void GetProcessListL( RProcessPointerList & aData )
105 TUint totalProcessListDescSize;
106 GetProcessListL( aData, totalProcessListDescSize );
110 Read the current process list.
111 The caller assumes ownership of the resulting data.
112 This call is only useful if the total descriptor size required for
113 transferring across the client-server boundary must be known.
115 @param aData Array of currently running processes.
116 @param aTotalProcessListDescSize Total descriptor size required
117 to transfer the list across the client-server interface.
119 @see RProcessPointerList.
122 virtual void GetProcessListL( RProcessPointerList & aData,
123 TUint & aTotalProcessListDescSize ) = 0;
127 Read the current executable list. The caller assumes ownership of the resulting data.
128 @param aData Array of current executables.
130 @see RExecutablePointerList.
133 virtual void GetExecutableListL( RExecutablePointerList & aData )
135 TUint totalExecutableListDescSize;
136 GetExecutableListL( aData, totalExecutableListDescSize );
141 Read the current executable list.
142 The caller assumes ownership of the resulting data.
143 This call is only useful if the total descriptor size required for
144 transferring across the client-server boundary must be known.
146 @param aData Array of current executables.
147 @param aTotalExecutableListDescSize Total descriptor size required
148 to transfer the list across the client-server interface.
150 @see RExecutablePointerList.
153 virtual void GetExecutableListL( RExecutablePointerList & aData,
154 TUint & aTotalExecutableListDescSize ) = 0;
158 Read the current thread list.
159 This call is only useful if the total descriptor size required for
160 transferring across the client-server boundary must be known.
162 @param aProcessId If this argument is -1, all the threads in the
163 system are returned. Otherwise the threads under the process with the id
164 aProcessId are returned.
165 @param aThreadList Array of currently running threads.
166 @param aTotalThreadListDescSize Size in bytes of the descriptor
167 required to transfer the data over the client server interface.
170 @see RThreadPointerList.
173 virtual void GetThreadListL( const TUint64 aProcessId,
174 RThreadPointerList & aThreadList,
175 TUint & aTotalThreadListDescSize ) = 0;
178 Read the current thread list.
179 The caller assumes ownership of the resulting data.
181 @param aProcessId If this argument is -1, all the threads in the
182 system are returned. Otherwise the threads under the process with the id
183 aProcessId are returned.
184 @param aThreadList Array of currently running threads.
187 @see RThreadPointerList
189 virtual void GetThreadListL( const TUint64 aProcessId,
190 RThreadPointerList & aThreadList )
192 TUint totalThreadListDescSize;
193 GetThreadListL( aProcessId, aThreadList, totalThreadListDescSize );
197 Obtain a list of the code segments for a process.
199 @param aTid Thread identifier to obtain code segments for.
200 @param aCodeSegs Array of code segments.
201 @param aTotalCodeSegListDescSize Size in bytes of the descriptor
202 required to transfer the data over the client server interface.
204 @see RCodeSegPointerList
207 virtual void GetCodeSegmentsL(const TUint64 aTid,
208 RCodeSegPointerList &aCodeSegs,
209 TUint &aTotalCodeSegListDescSize ) = 0;
212 Obtain a list of the code segments for a process.
214 @param aTid Thread identifier to obtain code segments for.
215 @param aCodeSegs Array of code segments.
217 @see RCodeSegPointerList
220 virtual void GetCodeSegmentsL(const TUint64 aTid, RCodeSegPointerList &aCodeSegs)
222 TUint totalThreadListDescSize;
223 GetCodeSegmentsL(aTid, aCodeSegs, totalThreadListDescSize);
226 /** For future expansion
227 @internalTechnology */
230 /** @internalTechnology */
234 #endif // CRASH_DATA_SOURCE_H