Binary Strolls

Cyber rambling (or ranting), mostly about code

Debugging RTEMS with GDB

June 23, 2013 , posted in rtems, gsoc, gdb

RTEMS is difficult to debug, since the default GDB behaviour follows a language based approch and developer will have to debug the application+RTEMS stack as a whole. We are in process of developing a new set of extenstions for GDB to play nice with RTEMS. The intial code is available in this github repository.

To use the extenstion, - Clone the repository {% codeblock lang:bash %} git clone {% endcodeblock %} - Assuming you have a working RTEMS toolchain, spin up the GDB and source the code. {% codeblock lang:bash %} $ sparc-rtems4.11-gdb

GNU gdb (GDB) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type “show copying” and “show warranty” for details. This GDB was configured as “–host=x86_64-linux-gnu –target=sparc-rtems4.11”. For bug reporting instructions, please see: (gdb) source path/to/clone/ RTEMS GDB Support loaded (gdb) {% endcodeblock %}

Here is a sneak peak of what will be capable: {% gist 5428535 %} {% gist 5488653 %}