[Dune] gdb pretty printers

Oliver Sander sander at mi.fu-berlin.de
Wed Oct 19 11:56:20 CEST 2011


Dear Dune!
A student of mine, Jan-Hendrik Peters, is implementing gdb pretty printers
for a few important Dune classes.  Pretty-printers are small python scripts
that make inspecting data structures in gdb less painful.  For example,
usually gdb will print a FieldVector like this:

(gdb) p foo
$2 = {<Dune::DenseVector<Dune::FieldVector<int, 10> >> = {<No data
fields>}, _data = {a = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6}}}

With the new pretty-printer it looks like this:

(gdb) p foo
$1 = Dune::FieldVector of type int and length  10:
"{6, 6, 6, 6, 6, 6, 6, 6, 6, 6}"

Support for more Dune data structures is on the way.

The implementation consists of a small number of Python scripts.
I would like to host them on the Dune server.    I guess a separate
top-level directory in the svn repository (like 
svn.dune-project.org/svn/gdb-pretty-printers)
would be a good way.Are the any objections to this? Are there further
comments regarding the infrastructure or generally this project?

A more detailed instruction on how to use the pretty printer will
be posted in due time.  Supposedly it will be similar to the stl
support described on http://sourceware.org/gdb/wiki/STLSupport

cheers,
Oliver




More information about the Dune mailing list