Skip to content

DominikLindorfer/Boost-GDB-Pretty-Printers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDB Pretty-Printers for the Boost Library

This repository is an extension to David Matei's and Ruediger Sonderfeld's work by including also a pretty printer for Boost's ublas vectors (boost::numeric::ublas::vector). The respective code can be found at the end of the printer.py file in the /boost folder.

For simplicity I've also included the libstdc++-v3 pretty printers for the STL objects in the /libstdcxx folder (taken from here)

A minimal example is also attached in the /example folder.

Installation

To install clone or download the content of this repository. Then add the following lines to your /.gdbinit file

python
import sys 
sys.path.insert(0, 'PATH_TO_REPOSITORY')
from libstdcxx.v6.printers import register_libstdcxx_printers
import boost.latest ### see note on Entry Points below
register_libstdcxx_printers (None)
boost.register_printers()
end

where PATH_TO_REPOSITORY is the absolute path to the files contained in this repository. If no .gdbinit file exists just create it. For simplicity I've included my own .gdbinit file, where the files of this repository are stored at '/home/lindorfer/gdb_printers/python'.

Example

Debug