安装最新版本GDB

    1. wget http://mirrors.ustc.edu.cn/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.xz
    2. tar -zxvf gcc-9.3.0.tar.xz
    3. wget http://mirrors.ustc.edu.cn/gnu/gdb/gdb-9.2.tar.xz
    4. tar -zxvf gdb-9.2.tar.xz
    5. cd gdb-9.2
    6. mkdir build
    7. cd build
    8. ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
    9. sudo make && make install


    ldd **查看执行文件依赖哪些库:

    1. $ ldd --help
    2. Usage: ldd [OPTION]... FILE...
    3. --help print this help and exit
    4. --version print version information and exit
    5. -d, --data-relocs process data relocations
    6. -r, --function-relocs process data and function relocations
    7. -u, --unused print unused direct dependencies
    8. -v, --verbose print all information
    9. For bug reporting instructions, please see:
    10. <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.