Skip to main content
Associate II
January 19, 2026
Question

Pretty-print support for GDB

  • January 19, 2026
  • 1 reply
  • 278 views

Is it possible to get pretty-print support for data-structures and custom types? It seems that not even STL types (e.g. std::vector) can be inspected easily by default:

 
std::_Vector_base<int, std::allocator<int> > = {...}
 std::_Vector_base<int, std::allocator<int> > = Variable object not found
This is all that is shown for a std::vector<int>.
Looking into this, it seems that GDB can do this via python-based pretty printers, which even seem to be available for for the libstdc++ bundled with the IDE, e.g. "/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.linux64_1.0.0.202510151430/tools/arm-none-eabi/lib/thumb/v7e-m+fp/hard/libstdc++.a-gdb.py"
However, Python support seems to be disabled for GDB, which I guess is the reason this isn't working?
 
> python print(True)
Python scripting is not supported in this copy of GDB.

So: Is there any current support for something like this? Or is it at least planned?

1 reply

Nawres GHARBI
Technical Moderator
February 11, 2026

hi @LukasLang 

there is no task planned for the moment to enable python scripting in GDB build, I'll share with dev and marketing but don't think it will be available soon if accepted

Lead II
April 13, 2026

Any updates?

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."