下载
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 installcp ~/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/ -rtest
gcc test.cpp -o testgdb -g
拷贝 gdb-install gdb-depend 到板子
配置环境变量
export PATH=/mnt/gdb-install/bin:$PATHexport LD_LIBRARY_PATH=/mnt/gdb-install/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/mnt/gdb-depend/lib/:$LD_LIBRARY_PATH
测试
gdb testgdb
移植gdb 到 Arm平台
最新推荐文章于 2023-12-12 15:06:03 发布