6

I work on a financial application (Linux/C++/gcc) that uses boost and templates extensively. The stack traces generated while debugging via GDB is horrifyingly complex with the internal template-wiring of boost adding a lot of ugly noise to the output. Does anyone know of a way to get a cleaner, prettier and more insightful stack-traces for C++ template-heavy (especially boost-heavy) code?

chrisaycock
  • 36,470
  • 14
  • 88
  • 125
ARV
  • 6,287
  • 11
  • 31
  • 41

1 Answers1

3

The Python support in newer versions of GDB has been used to provide pretty printers for template-heavy structures like the STL.

I haven't tried any of this myself. Unfortunately, it looks like adding support for Boost and for cleaning up stack traces (as opposed to pretty-printing values) may involve rolling some of your own Python code.

Josh Kelley
  • 56,064
  • 19
  • 146
  • 246