Better GDB support for rtems.

Joel Sherrill joel.sherrill at OARcorp.com
Sat Apr 6 15:56:13 UTC 2013


On 04/04/2013 03:13 PM, Dhananjay Balan wrote:
> Hi,
>
> I was fooling around rtems (Not much, was taking tests till yesterday) 
> and the general debugging stuff (Structures and stuff..), but I 
> couldn't find much documentation about it.
If your goal is the GSOC project to provide Python plugins to provide 
more insight
into RTEMS data structures, then you are in a no-man's land between an 
internal
capability of gdb which is new and likely not well documented and the 
internals
of RTEMS which require some insight to print in a useful way.

The key point to gdb support for displaying more about an RTEMS application
is that it doesn't require any code to run on the target hardware.
>
> I was stuck at following points,
>
> * Is there any specific tutorials or anything about GDB and rtems?
Not particularly. Once you connect to the target, any gdb tutorial
should be sufficient. gdb is always gdb -- the target changes and the
connection method to the target changes -- but the gdb interface is
the same.

So you could experiment with Python pretty-printing on a native gdb
and no RTEMS.
> * I could find from the wiki that rtems provides a primitive shell to 
> debug applications to a limit, I found the document on the shell - but 
> I am confused how to run it in a simulator. Any help?
See the fileio.exe sample. The "monitor" class of commands and the 
"rtems" class
of commands give some

Another option to look at is the gdb macros in 
rtems-testing/sim-scripts. This is how
you pretty printed things before the Python support in gdb. I wrote most 
of those
and getting Python pretty printing on par with those capabilities would 
be a big
improvement plus it is fairly easy to see where to go from there. It is 
far from
complete.

> * Afiu the simulator is a sparc sis (arch-run command) I am using, is 
> there any advantage if I run a qemu-sparc instance instead?
>
Not for adding python pretty printing support for rtems structures to gdb.
It will just make connecting to the sparc target more complicated.
> -- 
> Regards,
> Dhananjay M Balan,
>


-- 
Joel Sherrill, Ph.D.             Director of Research& Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35806
Support Available               (256) 722-9985




More information about the devel mailing list