|
|
(47 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| = Fedora 14 example =
| | * [[ITK/GDBPretty/Installation/Linux/Fedora14 | Fedora 14]] |
| | | * [[ITK/GDBPretty/Installation/Linux/DebianSqueeze | Debian Squeeze]] |
| == Install package dependencies ==
| |
| | |
| yum install gcc gcc-c++ git texinfo ncurses-devel flex bison python-devel
| |
| | |
| == Build custom GDB ==
| |
| | |
| === Build it ===
| |
| | |
| cd ~
| |
| mkdir gdb
| |
| cd gdb
| |
| git clone git://gitorious.org/~thewtex/gdb-python/archer-thewtex-python.git source
| |
| mkdir build install
| |
| cd build
| |
| ../source/configure --prefix=$(cd ../install && pwd)
| |
| make -j2 all install
| |
| | |
| === Put it at the top of the system PATH ===
| |
| | |
| su -
| |
| cd /usr/local/bin
| |
| ln -s /home/user/gdb/install/bin/gdb
| |
| exit
| |
| | |
| Replace ''user'' with your username.
| |
| | |
| Logout and login to a new shell to ensure the system follows the new path.
| |
| | |
| == Install custom pretty-printers ==
| |
| | |
| === Basic pretty-printers ===
| |
| | |
| yum install python-matplotlib cmake
| |
| | |
| Place the following in ''~/.gdbinit''
| |
| <pre>
| |
| #
| |
| # C++ related beautifiers (optional)
| |
| #
| |
| set print pretty on
| |
| set print object on
| |
| set print static-members on
| |
| set print vtbl on
| |
| set print demangle on
| |
| set demangle-style gnu-v3
| |
| set print sevenbit-strings off
| |
| set multiple-symbols ask
| |
| # working with arrays
| |
| set print array on
| |
| set print elements 70
| |
| | |
| #
| |
| # gdb-pretty
| |
| #
| |
| python
| |
| import sys
| |
| sys.path.insert( 0, '/home/user/gdb/gdb-pretty' )
| |
| sys.path.insert( 0, '/home/user/gdb/gdb-pretty/itk/source' )
| |
| import gdb.pretty
| |
| gdb.pretty.register( 'libstdcxx.v6.printers', None )
| |
| end
| |
| | |
| require command view
| |
| require command alias
| |
| </pre>
| |
| | |
| Replace ''user'' with your username.
| |
| | |
| mkdir ~/gdb/gdb-pretty
| |
| | |
| === ''libstdcxx'' pretty-printers ===
| |
| | |
| cd ~/gdb/gdb-pretty
| |
| git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-libstdcxx.git libstdcxx
| |
| | |
| Try running the example
| |
| | |
| cd libstdcxx/examples
| |
| less readme.rst
| |
| ...
| |
| | |
| === Science related pretty-printers ===
| |
| | |
| ==== Pretty printers in the Fedora repository ====
| |
| | |
| yum install mayavi paraview
| |
| | |
| ==== Install VV ====
| |
| | |
| Instructions on the [http://www.creatis.insa-lyon.fr/rio/vv VV homepage].
| |
| | |
| <pre>
| |
| # Place this file in /etc/yum.repos.d/creatis.repo
| |
| | |
| [creatis]
| |
| name=Medical imaging from creatis.insa-lyon.fr
| |
| baseurl=http://www.creatis.insa-lyon.fr/linux/fedora/$releasever/$basearch/os/
| |
| enabled=1
| |
| gpgcheck=0
| |
| </pre>
| |
| | |
| yum update
| |
| | |
| yum install InsightToolkit InsightToolkit-devel InsightToolkit-data gengetopt vtk vtk-python vtk-devel vtk-qt qt-devel
| |
| | |
| Download and build vv. Copy the executable to the system PATH, e.g.
| |
| | |
| cp vv ~/bin/
| |
| | |
| ==== GDB setup ====
| |
| cd ~/gdb/gdb-pretty
| |
| git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-science.git science
| |
| cd science
| |
| mkdir build
| |
| cmake -DCMAKE_INSTALL_PREFIX=~/gdb/install ..
| |