mirror of https://github.com/Icinga/icinga2.git
parent
f71a2ca340
commit
e08a95e0e3
|
@ -51,10 +51,12 @@ SLES/openSUSE:
|
||||||
Install the `boost`, `python` and `icinga2` pretty printers. Absolute paths are required,
|
Install the `boost`, `python` and `icinga2` pretty printers. Absolute paths are required,
|
||||||
so please make sure to update the installation paths accordingly (`pwd`).
|
so please make sure to update the installation paths accordingly (`pwd`).
|
||||||
|
|
||||||
Boost Pretty Printers:
|
|
||||||
|
|
||||||
$ mkdir -p ~/.gdb_printers && cd ~/.gdb_printers
|
$ mkdir -p ~/.gdb_printers && cd ~/.gdb_printers
|
||||||
$ git clone https://github.com/ruediger/Boost-Pretty-Printer.git && cd Boost-Pretty-Printer
|
|
||||||
|
Boost Pretty Printers compatible with Python 3:
|
||||||
|
|
||||||
|
$ git clone https://github.com/mateidavid/Boost-Pretty-Printer.git && cd Boost-Pretty-Printer
|
||||||
|
$ git checkout python-3
|
||||||
$ pwd
|
$ pwd
|
||||||
/home/michi/.gdb_printers/Boost-Pretty-Printer
|
/home/michi/.gdb_printers/Boost-Pretty-Printer
|
||||||
|
|
||||||
|
@ -71,7 +73,7 @@ Icinga 2 Pretty Printers:
|
||||||
Now you'll need to modify/setup your `~/.gdbinit` configuration file.
|
Now you'll need to modify/setup your `~/.gdbinit` configuration file.
|
||||||
You can download the one from Icinga 2 and modify all paths.
|
You can download the one from Icinga 2 and modify all paths.
|
||||||
|
|
||||||
Example on Fedora:
|
Example on Fedora 22:
|
||||||
|
|
||||||
$ wget https://raw.githubusercontent.com/Icinga/icinga2/master/tools/debug/gdb/gdbinit -O ~/.gdbinit
|
$ wget https://raw.githubusercontent.com/Icinga/icinga2/master/tools/debug/gdb/gdbinit -O ~/.gdbinit
|
||||||
$ vim ~/.gdbinit
|
$ vim ~/.gdbinit
|
||||||
|
@ -89,16 +91,20 @@ Example on Fedora:
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, '/home/michi/.gdb_printers/python')
|
sys.path.insert(0, '/home/michi/.gdb_printers/python')
|
||||||
from libstdcxx.v6.printers import register_libstdcxx_printers
|
from libstdcxx.v6.printers import register_libstdcxx_printers
|
||||||
register_libstdcxx_printers(None)
|
try:
|
||||||
|
register_libstdcxx_printers(None)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
end
|
end
|
||||||
|
|
||||||
python
|
python
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, '/home/michi/.gdb_printers/Boost-Pretty-Printer')
|
sys.path.insert(0, '/home/michi/.gdb_printers/Boost-Pretty-Printer')
|
||||||
from boost.printers import register_printer_gen
|
import boost_print
|
||||||
register_printer_gen(None)
|
boost_print.register_printers()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
If you are getting the following error when running gdb, the `libstdcxx`
|
If you are getting the following error when running gdb, the `libstdcxx`
|
||||||
printers are already preloaded in your environment and you can remove
|
printers are already preloaded in your environment and you can remove
|
||||||
the duplicate import in your `~/.gdbinit` file.
|
the duplicate import in your `~/.gdbinit` file.
|
||||||
|
|
|
@ -11,7 +11,10 @@ python
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, '/home/gbeutner/gdb_printers/python')
|
sys.path.insert(0, '/home/gbeutner/gdb_printers/python')
|
||||||
from libstdcxx.v6.printers import register_libstdcxx_printers
|
from libstdcxx.v6.printers import register_libstdcxx_printers
|
||||||
register_libstdcxx_printers(None)
|
try:
|
||||||
|
register_libstdcxx_printers(None)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
end
|
end
|
||||||
|
|
||||||
python
|
python
|
||||||
|
|
Loading…
Reference in New Issue