[Dune] gdb pretty printers

Andreas Dedner A.S.Dedner at warwick.ac.uk
Wed Oct 19 12:35:08 CEST 2011


Thats really neat!

On 19/10/11 10:56, Oliver Sander wrote:
> 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
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list