centos7中安装最新版本的gdb
001、系统
[root@PC1 software]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.6.1810 (Core) Release: 7.6.1810 Codename: Core
002、查看gdb版本
[root@PC1 software]# gdb --version GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>.
003、下载最新版gdb安装包,官网地址:https://ftp.gnu.org/gnu/gdb/
004、
[root@PC1 software]# tar -xzvf gdb-13.2.tar.gz [root@PC1 software]# cd gdb-13.2/ [root@PC1 gdb-13.2]# ./configure --prefix=/usr/ ## --prefix=/usr/参数实现自动配置环境变量 [root@PC1 gdb-13.2]# make [root@PC1 gdb-13.2]# make install
004、测试默认版本
[root@PC1 gdb-13.2]# gdb --version GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
。