|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-4993AF8E-28C3-54BA-8D27-D86E05D39CFD" xml:lang="en"><title>Crash |
|
13 Logger Technology</title><shortdesc>The Crash Logger contains a logger program that stores system state |
|
14 information when a crash occurs, and a reader application that can be used |
|
15 later to get this information</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
16 <section id="GUID-060E1937-9BB9-5A81-A1FA-7EAEA04B9DEF"><title>The |
|
17 crash logger</title> <p>When the kernel crashes, control is handed to the |
|
18 crash logger. It tries to read as much state information as it can reasonably |
|
19 find, and dumps it to a pre-reserved location in permanent storage flash storage). </p> <p>Support |
|
20 exists for dumping information to <i>nor</i> flash and <i>nand</i> flash. |
|
21 The crash logger must have its own drivers to do this, as it cannot be assumed |
|
22 that any specific part of the kernel is operating correctly in these circumstances. |
|
23 These drivers are essentially simplified versions of the standard drivers. </p> <p>All |
|
24 monitoring functionality, crash logging and crash debugging is placed in kernel |
|
25 extensions. Functionality can be enabled or disabled by placing the appropriate |
|
26 kernel extensions into ROM at ROM build time. </p> <p>To support both crash |
|
27 logging and debugging without duplicating code, a common module, <filepath>exmoncommon.dll</filepath>, |
|
28 has been created. This extension contains all of the generic monitoring code, |
|
29 and supports features such as dumping registers, thread stacks and object |
|
30 containers and is responsible for registering with the kernel’s crash monitor |
|
31 entry point: </p> <codeblock id="GUID-F1EF54CF-614D-5459-ABA1-07F5E9D3969E" xml:space="preserve">Epoc::SetMonitorEntryPoint()</codeblock> <p>This |
|
32 extension must be placed in ROM before either of the two monitoring extensions, |
|
33 as they both rely on its functionality. As <filepath>exmoncommon.dll</filepath> depends |
|
34 on the underlying memory model, it is built from the Variant. </p> <p>After |
|
35 the common monitoring code registers itself with the kernel, further debugging |
|
36 extensions may register with the common code. These extensions are called |
|
37 when the kernel fails, in the order that they register. The maximum number |
|
38 of extensions currently supported is nine though only two- the interactive |
|
39 debugger, and the non-interactive crash logger are provided. However, this |
|
40 is an arbitrary limit set by the macro definition <codeblock xml:space="preserve">MONITOR_MAXCOUNT</codeblock> in |
|
41 the file <filepath>E32\include\kernel\monitor.h</filepath>, and can be increased |
|
42 given sensible use cases. </p> <ul> |
|
43 <li id="GUID-75C55DE2-982C-59E2-8A93-43457B687165"><p> <filepath>exmondebug.dll</filepath> is |
|
44 the traditional interactive debugger. </p> </li> |
|
45 <li id="GUID-12933627-FEBC-5D1A-9573-81F15FEDA328"><p> <filepath>exmonlog.dll</filepath> is |
|
46 the crash logger. </p> </li> |
|
47 </ul> <p>These DLLs are also built from the Variant. In the case of the crash |
|
48 logger, two separate <filepath>.mmp</filepath> files exist: </p> <ul> |
|
49 <li id="GUID-88D7A132-143A-519A-8645-FAA11D484FC7"><p>one for NAND flash, |
|
50 building <filepath>exmonlognand.dll</filepath> </p> </li> |
|
51 <li id="GUID-EE02A14E-9E19-516D-93F9-B6590736D71C"><p>one for NOR flash, building <filepath>exmonlognor.dll</filepath> </p> </li> |
|
52 </ul> <p>The rombuild scripts ensure that the crash logger for only one type |
|
53 of flash is placed into the ROM, and named as <filepath>exmonlog.dll</filepath>. </p> </section> |
|
54 <section id="GUID-7CAFA8C9-597C-5F20-AB15-22FFC7EFA203"><title>The crash reader</title> <p>At |
|
55 the next system boot, the crash reader application uses the normal system |
|
56 flash drivers to read the crash log from the reserved non-filesystem (non-uservisible) |
|
57 flash area, and to write it into the user-visible file system. </p> <p>The |
|
58 output file from the crash reader is a text file, or a compressed <filepath>GZIP-compatible</filepath> file. </p> <p>The |
|
59 crash reader application is called <filepath>crashread.exe</filepath>, which |
|
60 is built from <filepath>e32utils\crashread\crashread.mmp</filepath>. </p> </section> |
|
61 </conbody></concept> |