移植gdb 到 Arm平台

  • 下载
    gdb-8.0 http://ftp.gnu.org/gnu/gdb/
    ncurses-6.1 http://ftp.gnu.org/gnu/ncurses/

  • 编译生成 ncurses-6.1
    cd ncurses-6.1
    ./configure –host=arm-poky-linux –prefix=/home/rank/HaiSi/gdb-depend –without-ada –enable-termcap –with-shared CC=arm-poky-linux-gcc
    make
    make install (install可能会报错,检查生成路径下是不是已经出现了lib/libncurse.so include/ 等库文件以及头文件,如果又可以忽略安装的错误)
    cp ~/HaiSi/gdb-depend/include/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/include/ -r
    cp ~/HaiSi/gdb-depend/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/lib64/ -a
    cp ~/HaiSi/gdb-depend/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/lib/ -a
    cp ~/HaiSi/gdb-depend/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/lib/ -a
    cp ~/HaiSi/gdb-depend/include/* /opt/imx-linux/x86-arm/arm-poky-linux/include/ -r

  • 编译生成 ncurses-6.1
    cd gdb-8.0
    ./configure –host=arm-poky-linux –enable-shared –prefix=/home/rank/HaiSi/gdb-install –without-x –disable-gdbtk –disable-tui –without-included-regex –without-included-gettext CC=arm-poky-linux-gcc
    make
    make install

  • cp ~/HaiSi/gdb-install/include/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/include/ -r
    cp ~/HaiSi/gdb-install/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/lib64/ -a
    cp ~/HaiSi/gdb-install/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/arm-poky-linux-gnu/lib/ -a
    cp ~/HaiSi/gdb-install/lib/* /opt/imx-linux/x86-arm/arm-poky-linux/lib/ -a
    cp ~/HaiSi/gdb-install/include/* /opt/imx-linux/x86-arm/arm-poky-linux/include/ -r

  • test

  • gcc test.cpp -o testgdb -g

    拷贝 gdb-install gdb-depend 到板子
    配置环境变量
    export PATH=/mnt/gdb-install/bin:$PATH

    export LD_LIBRARY_PATH=/mnt/gdb-install/lib/:$LD_LIBRARY_PATH

    export LD_LIBRARY_PATH=/mnt/gdb-depend/lib/:$LD_LIBRARY_PATH
    测试
    gdb testgdb

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值