c++ - Formatting GDB template arguments in a backtrace -
as work c++ template library in gdb (through terminal), trying find way of pretty-printing template arguments when, instance, viewing backtrace.
as example, visually trying find second (outermost) template argument in frame printed in gdb follows:
(gdb) f #10 try_to_refine_element<cgal::null_mesh_visitor_level< cgal::mesh_3::tets::refine_facets_visitor<cgal::regular_triangulation_3 <cgal::robust_weighted_circumcenter_filtered_traits_3<... (+10397 char)
these not stl templates, stl-template-printing-tools not applicable, , pretty-printing specific types not interest (i.e. custom pretty-printers) want view hierarchy of template arguments wide variety of classes/methods, rather representing content (these use-cases addressed in gdb docs). there few pretty-printing in-built settings in gdb none seem affect templates (please correct if i've missed them!).
is there way of getting gdb line-break , indent these more readably, or standard script use? template colour coding bonus! moment can cut-paste , run python format desired, seems reasonable better, tested solution exists.
while sure number of visual ides solve this, general workflow closely tied tmux in terminal, nice find compatible solution.
using frame filters, i've created gdb python plugin provide this: https://github.com/philtweir/gdb-pretty-frame-cpp
it not yet well-tested (and cgal/boost/stl/vtk), if there interest, can smarten bit.
while an answer, still prefer hear decent, established solution, code still pretty basic.
Comments
Post a Comment