5.17.3.3. Launch the Host GDB

Before launching the host GDB, you need to be sure you have sourced the cross-debugging environment script, which if you installed the root filesystem in the default location is at /opt/poky/1.6.1 and begins with the string "environment-setup". For more information, see the "Setting Up the Cross-Development Environment" section in the Yocto Project Application Developer's Guide.

Finally, switch to the directory where the binary resides and run the cross-gdb binary. Provide the binary file you are going to debug. For example, the following command continues with the example used in the previous section by loading the helloworld binary as well as the debugging information:

     $ arm-poky-linux-gnuabi-gdb helloworld
                    

The commands in your .gdbinit execute and the GDB prompt appears.