Gdb remote debugger

3,076 views

Published on

A guide telling how to set up remote debug

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,076
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
29
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Gdb remote debugger

  1. 1. GDB remote debugger perise@gmail.com
  2. 2. Agenda• What is GDB• Environment• Cross compile• Remote debugger setup• Notes
  3. 3. GDBGDB, the GNU Project debuggerhttp://ftp.gnu.org/gnu/gdb/gdb-7.5.tar.gz
  4. 4. EnvironmentGDB Ptrace ApplicationGDB Server Local Debug Remote Debug
  5. 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. 6. Remote debugger setupHost 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 helloworldHost setting Connect target from GDB target remote target-ip:target-port
  7. 7. Notes• Please compile your codes with -g for debug information
  8. 8. Backup

×