centos安装cython调试工具cygdb
安装依赖
# python2, centos8
yum install python-devel
# 安装 textinfo
dnf --enablerepo=PowerTools install texinfo
# 安装pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
export PATH=~/.pyenv/bin:$PATH
export PYENV_ROOT=~/.pyenv
eval "$(pyenv init -)"
source ~/.bashrc
# GDB的TUI依赖
yum install ncurses-devel
运行installLinux.sh
#!/usr/bin/env bash
#Running this script in Linux with the right packages installed will install cygdb
#Maintainer: Volker Weißmann volker.weissmann@gmx.de
set -e
sudo pip2 install cython pygments
curl https://ftp.gnu.org/gnu/gdb/gdb-${gdbver}.tar.xz --output gdb.tar.xz
curl https://ftp.gnu.org/gnu/gdb/gdb-${gdbver}.tar.xz.sig --output gdb.tar.xz.sig
curl https://ftp.gnu.org/gnu/gnu-keyring.gpg --output gnu-keyring.gpg
#Quotes from the gpgv manpage:
#gpgv assumes that all keys in the keyring are trustworthy. That does also mean that it does not check for expired or revoked keys.
#gpgv sigfile [datafile]
# Verify the signature of the file. The second form is used for detached signatures, where sigfile is the detached signature (either ASCII-armored or binary) and datafile contains the signed data;
#The program returns 0 if everything is fine, 1 if at least one signature was bad, and other error codes for fatal errors.
#gpgv --keyring ./gnu-keyring.gpg gdb.tar.xz.sig gdb.tar.xz || exit 1
tar -xf gdb.tar.xz
mv gdb-${gdbver} gdb-python2
cd gdb-python2
mkdir build
cd build
../configure --disable-source-highlight --enable-tui --with-python=python2
make #-j
sudo make install
pyenv install "$pyver" --debug
eval "$(pyenv init -)"
pyenv shell "$pyver"-debug
pip install cython pygments
echo -e "\nadd-auto-load-safe-path ~/.pyenv/versions/3.8.1-debug/bin/python3.8-gdb.py" >> ~/.gdbinit
echo "finished installation"