June 2017
Intermediate to advanced
478 pages
13h 14m
English
GDB needs to know where to find debug information and source code for the program and shared libraries you are debugging. When debugging natively, the paths are well known and built in to GDB, but when using a cross toolchain, GDB has no way to guess where the root of the target filesystem is. You have to give it this information.
If you built your application using the Yocto Project SDK, the sysroot is within the SDK, and so you can set it in GDB like this:
(gdb) set sysroot /opt/poky/2.2.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi
If you are using Buildroot, you will find that the sysroot is in output/host/usr/<toolchain>/sysroot, and that there is a symbolic link to it in output/staging. So, for Buildroot, you would ...
Read now
Unlock full access