GDB C/C++ Level Souce Code
joel at rtems.org
Mon Feb 20 16:11:10 UTC 2017
On Mon, Feb 20, 2017 at 8:54 AM, Joey DiGiorgio <digiorgiojoey at gmail.com>
> Thanks Gedare and Joel for the responses.
> I have debugged with QEMU in the past, so the only thing throwing me
> off was the symbol table part. I was using the .ralf file format, but
> I will try the .exe and see if I get results.
The .ralf is for downloading to the target so often won't have symbols.
In other real cases, you may be debugging code that is burned into Flash.
You can use a gdb command like symbol-file XXX to tell gdb where to
read the symbols from.
> - Joey D.
> On Sun, Feb 19, 2017 at 8:08 AM, Gedare Bloom <gedare at rtems.org> wrote:
> > Using GDB to debug RTEMS works basically like debugging a normal
> > executable. You should specify the executable name to GDB on the
> > command line or when you start GDB using 'file' or 'symbol-file'
> > commands. This will give you line numbers and source code.
> > In order to debug inside Qemu you need to attach gdb to qemu usually
> > by something like 'target remote localhost 7000' in case qemu is
> > listening on port 7000 for a gdb connection. On a local box, you can
> > also usually use the --pid x command line flag of gdb to connect it to
> > the process having pid x.
> > The --enable-rtems-debug will turn on some additional code inside
> > RTEMS to increase debug checks/asserts that are used. It should not be
> > necessary in order to actually debug, since the -g option usually is
> > given to gcc by the BSP's makefile.
> > Gedare
> > On Fri, Feb 17, 2017 at 3:54 PM, Joey DiGiorgio <digiorgiojoey at gmail.com>
> >> I am able to debug an RTEMS application while viewing the assembly
> >> language code, but is there any way to debug an RTEMS application and
> >> break, list, etc. the C/C++ level code?
> >> I tried building everything with the --enable-rtems-debug flag, but I
> >> still get a message about "symbol tables" not being loaded.
> >> To start I am just working with the "testsuites/samples/hello"
> >> application in either QEMU or the GDB simulator.
> >> - Joey D.
> >> _______________________________________________
> >> users mailing list
> >> users at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/users
> users mailing list
> users at rtems.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users