Advanced exception reporting (AER) is a sample component that allows an automotive supplier to get more information about a system crash than the information that is provided by an ordinary debugger.
An exception is an event that is unexpected or that disrupts the ability of a process to proceed normally. AER enables an automotive supplier to collect detailed information when an expected kernel exception is thrown. For additional information on kernel exceptions, go to Exception Handling in the PB Help documentation.
The AER component includes its own kernel debugger (AERkd.dll) and records information about exceptions that is normally discarded by the system. This information is logged in a text file by the exception reporting service.
The following are reporting features of AER:
- Context — Provides complete information about the context in which the exception was thrown (at the time when the exception occurs). This includes information about control registers, integer registers, and other registers. For additional information, see the CONTEXT structure in winnt.h.
- Stack Memory — Provides information found in stack memory after the exception was thrown. This includes information about the value of local variables so that the automotive supplier can perform more detailed analysis about these variables in relation to the thrown exception.
- System Memory Status — Provides information about the system memory status, such as the count of free pages and kernel usage information.
- System Stack Walker — Provides information retrieved from the system stack walker, such as the location of each frame’s return address, that was dumped to stack memory.
- Call Stack — Provides a utility (AerReport.pl) that reads stack information and uses map files to determine the functions stored in the call stack and display each function in plain text for more detailed analysis.
The data is dumped to a text file on any file system.
AER uses the file system APIs, and if the system is in a state in which file systems are not operational, the data will be lost. If an automotive supplier does not want to lose this data when the system goes into this state, then the supplier must change the exception reporting service to dump information to some area of non-volatile memory that they can analyze at a later time.
To enable this, AER is shipped in the AAK as source code, and the data storage faculty is factored out so that an automotive supplier must only change one piece of code. The AER sample is located in the AAK at Public\apc\oak\samples\aer.
If you would like to modify and rebuild the AER sample, make sure that you selected “Shared Source for Windows CE .NET 4.2” during your installation of Windows CE .NET 4.2. If you did not select “Shared Source for Windows CE .NET 4.2” during installation, you must go back and customize your installation by running the Windows CE .NET 4.2 Setup Wizard and selecting “Customize”. In the “Customize Setup” page, enable the “Shared Source for Windows CE .NET 4.2” list item in the tree view. Note that this option is not enabled by default.
NOTE In a Hive–based registry system, the AER registry settings must go into the boot hive. Windows Automotive uses a Hive–based registry system as default. To add the AER optional registry settings, you must edit the apc.reg file in Public\apc\oak\files. For additional information on Hive–based registry, go to Hive–based Registry in the Windows CE .NET Help documentation.
AER uses the following registry settings:
Buffer size in bytes:
“BufferSize” = dword:1024
Output path to place exception reports:
“OutputPath” = “windows\\”
NOTE When specifying a directory, you must append the directory name with “\\”, as shown in the example above. When a non–existent output path is specified in the registry, the AER service will not create the directory and the exception report will be lost.
Maximum number of reports that AER can save at any time:
“MaxDumps” = dword:5
Building a Platform with AER
To use AER, the platform developer must:
- Include the Advanced Exception Reporting catalog entry in the platform.
— Or —
Choose "Settings..." from the "Platform" menu, select the "Build Options" tab, and un-check the "Enable Kernel Debugger" option.
Topics in this Section