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:
Install gdb on tbdev1:
root@tbdev1: apt-get install gdb
Change into the /root/cross/builds directory and compile helloworld.c with the debugging flag -g:
root@tbdev1: cd /root/cross/builds root@tbdev1: gcc -g -o helloworld-i386-linux helloworld.c
You need to check a couple things. Using the file program, you can determine ...