| Getting Started with GCC-ERC32: C/C++ Compilation System for Mission Critical Spacecraft Applications | ||
|---|---|---|
| Prev | Appendix C. ERC32 Simulator Options | Next |
The following example shows an instruction trace with line numbers. We have delayed the trace by 100 microseconds to skip to the lines of interest.
$ erc-coff-run -t -d 100 hello
<return_from_interrupt+e4>
-----------------------
-- Instruction trace --
-----------------------
Trace timing starts at 100.000 microseconds
------------+----------------+--------+---+-+--------+---------------------------------------
CPU time in -----intpdr----- -----psr------ disassembled
microseconds fedcba9876543210 nzvc pil spe c pc instruction
------------+----------------+--------+---+-+--------+---------------------------------------
0.050 z 0 s 7 0200111C ldd [ %sp + 0x100 ], %f24
0.200 z 0 s 7 02001120 ldd [ %sp + 0x108 ], %f26
0.350 z 0 s 7 02001124 ldd [ %sp + 0x110 ], %f28
0.500 z 0 s 7 02001128 ldd [ %sp + 0x118 ], %f30
0.650 z 0 s 7 0200112C ld [ %sp + 0x138 ], %fsr
0.750 z 0 s 7 02001130 add %l0, 1, %l4
0.800 z 0 s 7 02001134 and %l4, 7, %l4
0.850 z 0 s 7 02001138 mov 1, %l5
0.900 z 0 s 7 0200113C sll %l5, %l4, %l5
0.950 z 0 s 7 02001140 rd %wim, %l4
1.000 z 0 s 7 02001144 btst %l4, %l5
1.050 z 0 s 7 02001148 be 0x2001194
1.100 z 0 s 7 0200114C nop
<return_from_interrupt+15c>
1.150 z 0 s 7 02001194 mov %l0, %psr
1.200 0 s 7 02001198 nop
1.250 0 s 7 0200119C nop
1.300 0 s 7 020011A0 jmp %l1
1.400 0 s 7 020011A4 rett %l2
<_main>
1.500 0 e 0 020014A8 sethi %hi(0x2003000), %o0
1.550 0 e 0 020014AC or %o0, 0x44, %l0 ! 0x2003044
1.600 0 e 0 020014B0 ld [ %o0 + 0x44 ], %o0
1.700 0 e 0 020014B4 cmp %o0, 0
1.800 z 0 e 0 020014B8 be 0x20014dc
1.850 z 0 e 0 020014BC clr %o0
...lots of output...