Hi all,
On Linux, when using GDB to debug C++ programs that use Boost, it's
difficult to get human readable values from variables.
e.g.
== Source ==
boost::optionalstd::string s("hello world");
== GDB ==
(gdb) print s
$1 = { >> =
{boost::optional_detail::optional_tag = {<No data fields>}, m_initialized
= true, m_storage = {dummy_ = {data = "(0`\000\000\000\000", aligner_ =
{<No data fields>}}}}, <No data fields>}
========
A set of python pretty printers that understand the internals of some Boost
objects can be found here: https://github.com/ruediger/Boost-Pretty-Printer
The resulting output is more useful:
== GDB ==
(gdb) print s
$2 = boost::optional > is initialized = {value = "Hello world"}
=========
Some distros, e.g. Fedora, CentOS have STL pretty printers working out of
the box. It would be great to also have Boost pretty printers widely
available via Linux distros.
Since the pretty printers are tightly coupled to the objects they're
printing, it would be ideal if they were included with Boost. That way
both the class definitions and python printers should stay in sync.
Can someone provide guidance on how to get code in the above github repo
into Boost?
Thanks,
Paul