2. Agenda
• What is GDB
• Environment
• Cross compile
• Remote debugger setup
• Notes
3. GDB
GDB, the GNU Project debugger
http://ftp.gnu.org/gnu/gdb/gdb-7.5.tar.gz
4. Environment
GDB
Ptrace Application
GDB Server
Local Debug
Remote Debug
5. Cross compile
• Create GDBServer for ARM
Move to gdb-7.5/gdb/gdbserver
./configure --target=arm-linux --host=arm-linux
make CC=/opt/arm-tools/arm-2009q1/bin/arm-none-linux-gnueabi-gcc
• Create GDB for ARM
Move to gdb-7.5 folder
./configure --target=arm-linux --prefix=/opt/arm-gdb
sudo make install
arm-linux-gdb is created for host
6. Remote debugger setup
Host setting
Connect GDB with local symbol
/opt/arm-gdb/bin/arm-linux-gdb helloworld
Target setting
Put GDBServer and Application to target
Start GDBServer
gdbserver :local-port helloworld
Host setting
Connect target from GDB
target remote target-ip:target-port