Add support for GDB pretty printers in the dev environment.

Refs #5996
This commit is contained in:
Gunnar Beutner 2014-04-11 11:42:37 +02:00
parent 1f8a1a9e1a
commit 492ec9dba8
4 changed files with 26 additions and 5 deletions

View File

@ -1,6 +1,8 @@
FROM debian:jessie
RUN apt-get update
RUN apt-get install -y clang cmake make ccache flex bison libboost-all-dev libssl-dev git-core cgdb
RUN apt-get install -y clang cmake make ccache flex bison libboost-all-dev libssl-dev git-core cgdb subversion
RUN cd /root && mkdir gdb_printers && cd gdb_printers && svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
RUN cd /root && git clone https://github.com/ruediger/Boost-Pretty-Printer
RUN mkdir /root/build
ADD build /root/build
ENV HOME /root

View File

@ -1,5 +1,10 @@
#!/bin/sh
cd $(dirname -- $0)/icinga2-build || exit 1
cd $(dirname -- $0) || exit 1
cp icinga2/tools/debug/gdb/gdbinit /root/.gdbinit
sed -i 's/home\/gbeutner/root/' /root/.gdbinit
cd icinga2-build || exit 1
CCACHE_SLOPPINESS="include_file_mtime"
export CCACHE_SLOPPINESS
@ -8,4 +13,4 @@ if [ ! -e CMakeCache.txt ]; then
CC="ccache clang" CXX="ccache clang++" cmake ../icinga2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/icinga2 -DCMAKE_INSTALL_SYSCONFDIR=/root/icinga2-config
fi
make -j 4 && make install && cgdb -ex r --args /opt/icinga2/sbin/icinga2 -c /root/icinga2-config/icinga2/icinga2.conf -DUseVfork=0
make -j 4 && make install && cgdb -ex set scheduler-locking step -ex r --args /opt/icinga2/sbin/icinga2 -c /root/icinga2-config/icinga2/icinga2.conf -DUseVfork=0

View File

@ -4,4 +4,11 @@ DIR=`pwd`
cd docker
docker.io build -t icinga2 --rm .
docker.io run -v $DIR/..:/root/icinga2 -v $DIR/.build:/root/icinga2-build -v $HOME/.ccache:/root/.ccache -v $DIR/config:/root/icinga2-config -t -i icinga2 /root/build
if [ "$1" != "-i" ]; then
command="/root/build"
else
command="/bin/bash"
fi
docker.io run -v $DIR/..:/root/icinga2 -v $DIR/.build:/root/icinga2-build -v $HOME/.ccache:/root/.ccache -v $DIR/config:/root/icinga2-config -t -i --rm icinga2 $command

View File

@ -11,5 +11,12 @@ python
import sys
sys.path.insert(0, '/home/gbeutner/gdb_printers/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
register_libstdcxx_printers(None)
end
python
import sys
sys.path.insert(0, '/home/gbeutner/Boost-Pretty-Printer')
from boost.printers import register_printer_gen
register_printer_gen(None)
end