Let's start by compiling and debugging helloworld solely on the host system, tbdev1. The script buildrootfilesystem generates helloworld.c in /root/cross/builds and cross-compiles it for the target system. Let's use that source code file and compile it for the x86 processor using tbdev1. Here are the steps to install gdb and compile and debug helloworld.c for the x86 on tbdev1:
In this section, you compiled helloworld with the debugging flag -g. Using the file program, you determined helloworld's architecture and found that it contains debugging symbol tables. Then you executed helloworld within gdb, listed its source code, ran helloworld, set a breakpoint, examined a variable value, and set a variable. You did all this on the Project Trailblazer development workstation, tbdev1. In the next section, you will learn how to remotely debug a cross-compiled version of helloworld on Project Trailblazer's ARM target board over the network.
18.188.38.142