
GRMON3-UM
June 2019, Version 3.1.0
18
www.cobham.com/gaisler
40000010 91d02000 01000000 01000000 01000000 . .............
40000020 91d02000 01000000 01000000 01000000 . .............
40000030 91d02000 01000000 01000000 01000000 . .............
grmon> mem 0x40000000 16
40000000 a0100000 29100004 81c52000 01000000 ...)..... .....
grmon> mem main 48
40003278 9de3bf98 2f100085 31100037 90100000 ..../...1..7....
40003288 d02620c0 d025e178 11100033 40000b4b & .%[email protected]
40003298 901223b0 11100033 40000af4 901223c0 ..#....3@.....#.
The memory access commands listed in Table 3.2 are not restricted to memory: they can be used on any bus
address accessible by the debug link. However, for access to peripheral control registers, the command info reg
can provide a more user-friendly output.
All commands in Table 3.2, , except for amem, return to the caller when the bus access has completed, which
means that a sequence of these commands generates a sequence of bus accesses with the same ordering. In situa-
tions where the bus accesses order is not critical, the command amem can be used to schedule multiple concurrent
read accesses whose results can be retrieved at a later time. This is useful when GRMON is automated using Tcl
scripts.
3.4.8. Instruction disassembly
If the memory contents is SPARC machine code, the contents can be displayed in assembly code using the dis-
assemble command:
grmon3> disassemble 0x40000000 10
0x40000000: 88100000 clr %g4 <start+0>
0x40000004: 09100034 sethi %hi(0x4000d000), %g4 <start+4>
0x40000008: 81c12034 jmp %g4 + 0x34 <start+8>
0x4000000c: 01000000 nop <start+12>
0x40000010: a1480000 mov %psr, %l0 <start+16>
0x40000014: a7500000 mov %wim, %l3 <start+20>
0x40000018: 10803401 ba 0x4000d01c <start+24>
0x4000001c: ac102001 mov 1, %l6 <start+28>
0x40000020: 91d02000 ta 0x0 <start+32>
0x40000024: 01000000 nop <start+36>
grmon3> dis main
0x40004070: 9de3beb8 save %sp, -328, %sp <main+0>
0x40004074: 15100035 sethi %hi(0x4000d400), %o2 <main+4>
0x40004078: d102a3f4 ld [%o2 + 0x3f4], %f8 <main+8>
0x4000407c: 13100035 sethi %hi(0x4000d400), %o1 <main+12>
0x40004080: 39100088 sethi %hi(0x40022000), %i4 <main+16>
0x40004084: 3710003a sethi %hi(0x4000e800), %i3 <main+20>
0x40004088: d126e2e0 st %f8, [%i3 + 0x2e0] <main+24>
0x4000408c: d1272398 st %f8, [%i4 + 0x398] <main+28>
0x40004090: 400006a9 call 0x40005b34 <main+32>
0x40004094: 901262f0 or %o1, 0x2f0, %o0 <main+36>
0x40004098: 11100035 sethi %hi(0x4000d400), %o0 <main+40>
0x4000409c: 40000653 call 0x400059e8 <main+44>
0x400040a0: 90122300 or %o0, 0x300, %o0 <main+48>
0x400040a4: 7ffff431 call 0x40001168 <main+52>
0x400040a8: 3510005b sethi %hi(0x40016c00), %i2 <main+56>
0x400040ac: 2510005b sethi %hi(0x40016c00), %l2 <main+60>
3.4.9. Using the trace buffer
The LEON processor and associated debug support unit (DSU) can be configured with trace buffers to store both
the latest executed instructions and the latest AHB bus transfers. The trace buffers are automatically enabled by
GRMON during start-up , but can also be individually enabled and disabled using tmode command. The command
ahb is used to show the AMBA buffer. The command inst is used to show the instruction buffer. The command
hist is used to display the contents of the instruction and the AMBA buffers mixed together. Below is an example
debug session that shows the usage of breakpoints, watchpoints and the trace buffer:
grmon3> lo v8/stanford.exe
40000000 .text 54.8kB / 54.8kB [===============>] 100%
4000DB30 .data 2.9kB / 2.9kB [===============>] 100%
Total size: 57.66kB (786.00kbit/s)
Entry point 0x40000000
Image /home/daniel/examples/v8/stanford.exe loaded
Содержание GRMON3
Страница 56: ...GRMON3 UM June 2019 Version 3 1 0 56 www cobham com gaisler...
Страница 114: ...GRMON3 UM June 2019 Version 3 1 0 114 www cobham com gaisler...
Страница 123: ...GRMON3 UM June 2019 Version 3 1 0 123 www cobham com gaisler dcache...
Страница 156: ...GRMON3 UM June 2019 Version 3 1 0 156 www cobham com gaisler SEE ALSO Section 6 13 On chip logic analyzer driver...
Страница 208: ...GRMON3 UM June 2019 Version 3 1 0 208 www cobham com gaisler SEE ALSO Section 3 5 Tcl integration...