gdb remote debugger
DESCRIPTION
A guide telling how to set up remote debugTRANSCRIPT
GDB remote debugger
Agenda
• What is GDB
• Environment
• Cross compile
• Remote debugger setup
• Notes
GDB
GDB, the GNU Project debugger
http://ftp.gnu.org/gnu/gdb/gdb-7.5.tar.gz
Environment
Application
GDB
Ptrace
GDB Server
Local Debug
Remote Debug
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
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
Notes
• Please compile your codes with -g for debug information
Backup