码迷,mamicode.com
首页 > 移动开发 > 详细

Build gdb-7.7.1 for remote debug arm app

时间:2014-07-07 14:40:40      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   strong   os   

 GDB: The GNU Project Debugger

http://www.gnu.org/software/gdb/

Download from: ftp://sourceware.org/pub/gdb/releases/

Build:

PC side:

cd /opt/crosstool/src/gdb-7.7.1/
./configure --target=arm-linux --prefix=/opt/crosstool/arm-gdb
make -j4
sudo make install
ls /opt/crosstool/arm-gdb/bin
arm-linux-gdb  arm-linux-run

 

arm side:

cd /opt/crosstool/src/gdb-7.7.1/gdb/gdbserver/
CC=arm-linux-gcc ./configure --target=arm-linux --host=arm-linux --prefix=/opt/crosstool/arm-gdb/gdbserver
make -j4
sudo make install
ls /opt/crosstool/arm-gdb/gdbserver/bin/
arm-linux-gdbserver

 

Debug:

PC side:

cd hello
arm-linux-gcc -g -o app hello.c
ls
app

 

arm side:

arm-linux-gdbserver pc_ip:port app [app_args ...]

PC side:

cd hello
arm-linux-gdb app target remote arm_ip:port

 

Build gdb-7.7.1 for remote debug arm app,布布扣,bubuko.com

Build gdb-7.7.1 for remote debug arm app

标签:style   blog   http   color   strong   os   

原文地址:http://www.cnblogs.com/kozmers/p/3815258.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!