GDB C/C++ Level Souce Code
Joey DiGiorgio
digiorgiojoey at gmail.com
Mon Feb 20 14:54:07 UTC 2017
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.
- 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> wrote:
>> 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
More information about the users
mailing list