This repository has been archived on 2021-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
terminal/gdbinit
Kenneth Benzie (Benie) cecbcddd2b Enable gdb pretty printing for libstdc++
gdb 7.0 added support for python pretty printers, libstdc++ provides
python pretty printers but they are not loaded by default on LinuxMint
18. Load them but only for this distro as upstream Debian enables them
by default and loading them multiple times will throw an exception.
2018-11-07 11:53:45 +00:00

14 lines
450 B
Plaintext

set print pretty on
set auto-load safe-path ~/
# Enable C++ std pretty printing in LinuxMint 18.X
# https://sourceware.org/gdb/wiki/STLSupport
python
from platform import linux_distribution
distro = linux_distribution()
if 'LinuxMint' == distro[0] and '18' in distro[1]:
from sys import path
path.insert(0, '/usr/share/gcc-5/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers(None)
end