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 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 // Common Crash Data definitions used between the core dump server,
15 // formatters and user interfaces
33 #include <rm_debug_api.h>
35 using namespace Debug;
38 Crash event information. This is given to a formatter when a crash occurs.
39 @see CCoreDumpFormatter::CrashEventL()
49 /** ECrashException is raised when a hardware exception occurs */
52 /** ECrashKill is raised when a thread is killed or panicked */
67 /** Exception type or exit type.
68 If crash type iType is ECrashException, this is set to e32const.h::TExcType
69 If crash type iType is ECrashKill, this is set to e32const.h::TExitType.
73 /** This is only set when iType is ECrashKill. Kernel panic code. */
76 /** Crash category description. Valid when crash type is ECrashKill */
77 TBuf<KMaxExitCategoryName> iCategory;
79 /** Crashed thread id */
82 /** Crashed process id */
88 /** Register context at time of crash.
90 @see Debug::TRmdArmExcInfo
92 TRmdArmExcInfo iContext;
94 /** Reserved for future.
95 @internalTechnology */
97 /** @internalTechnology */
99 /** @internalTechnology */
104 Code segment information.
105 @see CServerCrashDataSource::GetCodeSegmentsL()
111 Name of code segment.
113 TBufC<KMaxPath> iName;
116 Set to trie to indicates that this executable is executing in place.
122 Type of the code segment.
123 @see Debug::TCodeSegType
128 /** Code size in bytes */
131 /** Code segment run address. If code segment is XIP then
132 this is the same as iCodeLoadAddr */
133 TLinAddr iCodeRunAddr;
135 /** Address where code segement was loaded from */
136 TLinAddr iCodeLoadAddr;
138 /** Size on bytes of the read only data */
141 /** Address of read only data at run time. If code segment is XIP then
142 this is the same as iRoDataLoadAddr */
143 TLinAddr iRoDataRunAddr;
145 /** Address where read only data was loaded from */
146 TLinAddr iRoDataLoadAddr;
148 /** Writable data size in bytes. Combined .bss and .data sections */
151 /** Address of writable data at run time */
152 TLinAddr iDataRunAddr;
154 /** Build time address of initialised writable data */
155 TLinAddr iDataLoadAddr;
157 /** reserved for future
158 @internalTechnology */
160 /** @internalTechnology */
162 /** @internalTechnology */
167 Pointer array of TCodeSegInfo objects.
170 typedef RPointerArray<TCodeSegInfo> RCodeSegPointerList;
174 Detailed information about a register.
175 The Symbian ELF format defines the register identification format.
176 The Debug Security Server implements this format.
177 @see CCrashDataSource::ReadRegistersL()
184 IMPORT_C TUint16 GetId() const;
185 IMPORT_C TUint16 GetSubId() const;
186 IMPORT_C TUint8 GetSize() const;
187 IMPORT_C TUint8 GetClass() const;
188 IMPORT_C TBool SameRegister( const TRegisterData & other ) const;
190 IMPORT_C TUint8 GetContent8() const;
191 IMPORT_C TUint16 GetContent16() const;
192 IMPORT_C TUint32 GetContent32() const;
193 IMPORT_C TUint64 GetContent64() const;
195 IMPORT_C void SetContent8( const TUint8 aVal );
196 IMPORT_C void SetContent16( const TUint16 aVal );
197 IMPORT_C void SetContent32( const TUint32 aVal );
198 IMPORT_C void SetContent64( const TUint64 aVal );
199 IMPORT_C void SetContent( const TUint aVal );
201 IMPORT_C void SetContent( const TRegisterData & other );
203 IMPORT_C TBool Available( ) const;
204 IMPORT_C void SetAvailable( const TBool aAvailable );
208 This is the same as symbianelfdefs.h ESYM_REGREP.
211 typedef enum TRegisterRepresentation
213 /** 8 Bit register */
215 /** 16 Bit register */
217 /** 32 Bit register */
219 /** 64 Bit register */
228 This is the same as symbianelfdefs.h ESYM_REGCLASS.
231 typedef enum TRegisterClass
233 /** A Core register */
235 /** A Co Processor register */
249 /** Used when calling the Debug Security Server */
250 TRegisterInfo regInfo;
252 /** Same as Sym32_reginfod::rd_id
253 if rid_class == ESYM_REG_CORE
254 rd_id is one of rm_debug_api.h::TFunctionalityRegister
256 rd_id is CoProcessor number, eg 15 for ARM CP15
258 @see Sym32_reginfod::rd_id
263 /** Same as Sym32_reginfod::rid_class
264 Type of register ESYM_REG_CLASS :{ ESYM_REG_CORE = 0, ESYM_REG_COPRO = 1 }
265 @see Sym32_reginfod::rid_class
269 /** Same as Sym32_reginfod::rd_sub_id
270 Only used if rid_clas == ESYM_REG_COPRO
272 Bitfield is made up of the following fields:
273 bits 13 to 11 : OpCode2
274 bits 10 to 8 : OpCode1
278 @see Sym32_reginfod::rd_sub_id
282 /** Same as Sym32_reginfod::rd_repre
283 { ESYM_REG_8 == 0, ESYM_REG_16 == 1, ESYM_REG_32 == 2, ESYM_REG_64 == 3 }
284 Determines which version of GetContent*() to use
285 @see Sym32_reginfod::rd_repre
290 /** True if the content of this register was succesfully obtained from
294 /** Register value */
297 /** Value of an 8 bit register */
300 /** Value of a 16 bit register */
303 /** Value of a 32 bit register */
306 /** Value of a 64 bit register */
310 /** Reserved for future use
311 @internalTechnology */
314 /** @internalTechnology */
317 /** @internalTechnology */
326 List of TRegisterData objects.
330 typedef RArray<TRegisterData> RRegisterList;
333 #endif // CRASH_DATA_H