ubuntu 18.04 安装gdb

  • 编译gdb

官网下载

gdb-8.3.tar.gz

我的交叉编译:aarch64-linux-gnu-gcc

操作步骤如下

安装过程需要网络,请先配置好,我环境少texinfo 在make install时候会报错,需要安装下面的包,重新来的时候,

需要

make distclean

rm ./gdb/config.cache

一下

apt-get install texinfo

报错信息:

WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         
Makefile:486: recipe for target 'gdb.info' failed
 

具体操作如下:


./configure --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --prefix=/home/forlinx/work/tools/gdb-8.3/arm_gdb

make 

make install
  • 编译gdbserver

cd ./gdb/gdbserver/

./configure --host=aarch64-linux-gnu CC=aarch64-linux-gnu-gcc --target=aarch64-linux-gnu --prefix=/home/forlinx/work/tools/gdb-8.3/arm_gdbserver

make 

make install

 

 

 

 

 


 

你可能感兴趣的:(linux)