| |||
| Home > Working with the Snapshot Viewer > Creating a Snapshot Viewer initialization file | |||
The Snapshot Viewer initialization file is a simple text file
consisting of one or more sections that emulate the state of the
original system. Each section uses an structure.option=value
You must use .ini for the file extension.
Before creating a Snapshot Viewer initialization file you must ensure that you have:
One or more binary files containing a snapshot of the application that you want to analyze.
The binary files must be formatted correctly in accordance with the following restrictions.
Details of the type of processor.
Details of the memory region addresses and offset values.
Details of the last known register values.
To create a Snapshot Viewer initialization file, you must add grouped sections as required from the following list.
[global]A section for global settings. The following option can be used:
coreThe selected processor, for example, core=Cortex-M3.
[dump]One or more sections for contiguous memory regions stored in a binary file. The following options can be used:
fileLocation of the binary file.
addressMemory start address for the specified region.
lengthLength of the region. If none specified then the default is the rest of file from the offset value.
offsetOffset of the specified region from the start of the file. If none specified then the default is zero.
[regs]A
section for standard ARM® register
names and values, for example, R0=0x0.
Banked registers can be explicitly specified using their names
from the ARM Architecture Reference Manual,
for example, R13_fiq. In addition, the current
mode is determined from the Program Status Registers (PSRs), allowing
register names without mode suffixes to be identified with the appropriate
banked registers.
The values of the PSRs and PC registers must always be provided. The values of other registers need only be provided if it is intended to read them from the debugger.
Consider:
[regs] CPSR=0x600000D2 ; IRQ SP=0x8000 R14_irq=0x1234
Reading the registers named SP, R13, or R13_irq all yield
the value 0x8000.
Reading the registers named LR, R14, or R14_irq all yield
the value 0x1234.
All registers are 32-bits.
The following restrictions apply:
If you require a global section then it must be the first in the file.
Consecutive bytes of memory must appear as consecutive bytes in one or more dump files.
Address ranges representing memory regions must not overlap.
Example 13. Snapshot Viewer Initialization file
; All sections are optional [global] core=Cortex-M3 ; Selected processor ; Location of a contiguous memory region stored in a dump file [dump] file="path/dumpfile1.bin" ; File location (full path must be specified) address=0x8000 ; Memory start address for specific region length=0x0090 ; Length of region ; (optional, default is rest of file from offset) ; Location of another contiguous memory region stored in a dump file [dump] file="path/dumpfile2.bin" ; File location address=0x8090 ; Memory start address for specific region offset=0x0024 ; Offset of region from start of file ; (optional, default is 0) ; ARM registers [regs] R0=0x000080C8 R1=0x0007C000 R2=0x0007C000 R3=0x0007C000 R4=0x00000363 R5=0x00008EEC R6=0x00000000 R7=0x00000000 R8=0x00000000 R9=0xB3532737 R10=0x00008DE8 R11=0x00000000 R12=0x00000000 SP=0x0007FFF8 LR=0x0000808D PC=0x000080B8