Created
February 15, 2017 20:48
-
-
Save Shengliang/3f2badd4c8041613910ac5e0a63c5fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum commands: | |
yum info package-name | |
yum install package-name | |
rpm -ql package-name | |
yum search libudev | |
g++ | |
From https://gist.github.com/craigminihan/b23c06afd9073ec32e0c | |
153 g++ --version | |
156 sudo yum install libmpc-devel | |
157 sudo yum install mpfr-devel | |
158 sudo yum install gmp-devel | |
160 curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.4/gcc-4.9.4.tar.bz2 -O | |
162 tar xvfj gcc-4.9.4.tar.bz2 | |
163 cd gcc-4.9.4 | |
164 ./configure --disable-multilib --enable-languages=c,c++ --prefix=/usr | |
165 make -j 4 | |
166 sudo make install | |
167 which g++ | |
168 g++ --version | |
gdb | |
git clone git://sourceware.org/git/binutils-gdb.git | |
sudo yum install python26-devel.x86_64 | |
./configure --with-python=/usr/bin/python | |
make | |
sudo make install | |
Instructions are here: https://sourceware.org/gdb/wiki/STLSupport, but use the following steps: | |
The actual Python script used by gdb is here: | |
https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=libstdc%2b%2b-v3/python/libstdcxx/v6/printers.py;hb=HEAD | |
Next, download STL support Python scripts for gdb: | |
mkdir ~/gdb-printers | |
cd ~/gdb-printers | |
svn co http://gcc.gnu.org/svn/gcc/trunk/libstdc\+\+-v3/python | |
Edit ~/.gdbinit and add the following lines: | |
python | |
import sys | |
sys.path.insert(0, '<absolute path prefix>/gdb-printers/python') | |
from libstdcxx.v6.printers import register_libstdcxx_printers | |
register_libstdcxx_printers (None) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment