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.
14 lines
450 B
Plaintext
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
|