wiki:Debugging/GDBScripts

Version 9 (modified by ChrisJohns, on Jul 22, 2008 at 4:00:20 PM) (diff)

Moved to the FTP server.

GdbScripts?

This is a set of user-defined commands for gdb which are useful in analyzing an RTEMS application. They can be used to display information about a number of RTEMS objects classes along with information about the system in general. The user defined commands should be saved in a file which is "sourced" as part of invoking gdb. This can be done in two ways. The first is from the command line:

sparc-rtems4.7-gdb --command=rtems-gdb-macros sp01.exe

The second mechanism is from the command line interactively:

sparc-rtems-gdb sp01.exe
...
(gdb) source rtems-gdb-macros

Once the user-defined commands have been loaded, you can do a help user-defined for a list of the user-defined commands or help rtems_XXX for detailed usage information.

--Dr. Joel? 13:44, 11 Jul 2006 (CDT)


I found some tweaking was required to get this to work on a Coldfire based bsp.

Specifically: Changed the variable named $count to $i (don't know why I needed to do this) Adjusted the stack backtrace for Coldfire ( use frame pointer a6 as the starting point for the back trace). --Paul Whitfield? 19:25, 6 Aug 2006 (CDT)


Moved out of the Wiki to the FTP server and updated for RTEMS 4.9. Check out http://www.rtems.org/ftp/pub/rtems/people/chrisj/gdb-scripts.

Add support for the i386. You need to edit the script file to get back trace support for your target.

--ChrisJohns? 07:00, 22 July 2008 (CDT)