GNOME Bugzilla – Bug 664721
Improve embedded systems debugging experience
Last modified: 2011-11-24 20:08:15 UTC
When using OpenOCD together with gdb it is possible to program target (chip that runs inferior binary) with file provided to gdb (ie. elf file). To program the target from gdb session, after connecting ("target remote ip:port") one must halt the target ("monitor reset halt") and issue "load" command. Depending on the sections defined in loaded file, code can be automagically put into RAM or flash (or other storage). This particular feature is handy for debugging "memory builds" (that normally get loaded from storage to RAM by bootloader) of firmware. Due to limited nature of debugging capabilities of different targets, it should be possible to set maximum number of breakpoints and watchpoints. To do so, in gdb following commands can be used: "set remote hardware-breakpoint-limit N" and "set remote hardware-watchpoint-limit M", where N and M are respectively the number of breakpoints and watchpoints supported by target hardware. Both of these values depends on the target chip itself, not on the JTAG adapter used (ie. JTAGkey or wiggler). Some basic information about using GDB with OpenOCD can be found in OpenOCD user's guide [1]. Another nice to have feature improving debugging of embedded systems would be gdb console access (already reported in #604845). [1] http://openocd.sourceforge.net/doc/html/GDB-and-OpenOCD.html
*** This bug has been marked as a duplicate of bug 664743 ***