
GRMON3-UM
June 2019, Version 3.1.0
31
www.cobham.com/gaisler
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) hbreak *0xf0004000
Hardware assisted breakpoint 3 at 0xf0004000: file /home/user/linuxbuild-1.0.2/l
inux/linux-2.6-git/arch/sparc/kernel/head_32.S, line 87.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/linuxbuild-1.0.2/output/images/image.ram
Breakpoint 3, trapbase_cpu0 () at /home/user/linuxbuild-1.0.2/linux/linux-2.6-gi
t/arch/sparc/kernel/head_32.S:87
87 t_zero: b gokernel; nop; nop; nop;
Current language: auto; currently asm
(gdb) break leon_init_timers
Breakpoint 4 at 0xf03cff14: file /home/user/linuxbuild-1.0.2/linux/linux-2.6-git
/arch/sparc/kernel/leon_kernel.c, line 116.
(gdb) cont
Continuing.
Breakpoint 4, leon_init_timers (counter_fn=0xf00180c8 <timer_interrupt>)
at /home/user/linuxbuild-1.0.2/linux/linux-2.6-git/arch/sparc/kernel/leon_ke
rnel.c:116
116 leondebug_irq_disable = 0;
Current language: auto; currently c
3.7.8. Specific GDB optimization
GRMON detects GDB access to register window frames in memory which are not yet flushed and only reside
in the processor register file. When such a memory location is read, GRMON will read the correct value from
the register file instead of the memory. This allows GDB to form a function trace-back without any (intrusive)
modification of memory. This feature is disabled during debugging of code where traps are disabled, since no
valid stack frame exist at that point.
3.7.9. GRMON GUI considerations
The Graphical User Interface of GRMON can be used in parallel with GDB C/C++ level debugging. More details
are described in Section 4.7, “C/C++ level debugging”.
3.7.10. Limitations of GDB interface
GDB must be built for the SPARC architecture, a native PC GDB does not work together with GRMON. The
toolchains that Cobham Gaisler distributes comes with a patched and tested version of GDB targeting all SPARC
LEON development tools.
Do not use the GDB where commands in parts of an application where traps are disabled (e.g.trap handlers). Since
the stack pointer is not valid at this point, GDB might go into an infinite loop trying to unwind false stack frames.
The thread support might not work either in some trap handler cases.
The step instruction commands si or stepi are implemented by GDB inserting software breakpoints through GR-
MON. This is an approach that is not possible when debugging in read-only memory such as boot sequences ex-
ecuted in PROM/FLASH. One can instead use hardware breakpoints using the GDB command hbreak manually.
3.8. Thread support
GRMON has thread support for the operating systems shown below. The thread information is accessed using the
GRMON thread command. The GDB interface of GRMON is also thread aware and the related GDB commands
are described in the GDB documentation and in Section 3.7.6, “GDB Thread support”.
Supported operating systems
• RTEMS
• VXWORKS
• eCos
• Bare-metal
GRMON needs the symbolic information of the image that is being debugged in order to retrieve the addresses
of the thread information. Therefore the symbols of the OS must be loaded automatically by the ELF-loader
Содержание 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...