您的位置:首页 > 移动开发

Build gdb for remote debug ARM app

2014-06-29 17:21 471 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐