joachim-reichel.eu
This python module provides GDB pretty printers for the containers from STLport. It is based on a similar python module for libstdc++. It has been tested with GDB versions 7.0.1, 7.2, and 7.4.1 and STLport versions 4.6.2, 5.0.3, 5.1.7, and 5.2.1.
With these pretty printers GDB prints an instance of std::string from STLport as
instead of the very hard to understand real structure:
$2 = { <stlp_std::priv::_String_base<char, stlp_std::allocator<char> >> = { _M_buffers = { _M_end_of_storage = 0x6f57206f6c6c6548 <Address 0x6f57206f6c6c6548 out of bounds>, _M_static_buf = "Hello World!\000\177\000\000\266\005\000\000\001\000\000\000p\331\377\377\377\177\000" }, _M_finish = 0x7fffffffd8ec "", _M_start_of_storage = { <stlp_std::allocator<char>> = { <stlp_std::__stlport_class<stlp_std::allocator<char> >> = {<No data fields>}, <No data fields>}, members of stlp_std::priv::_STLP_alloc_proxy<char*, char, stlp_std::allocator<char> >: _M_data = 0x7fffffffd8e0 "Hello World!" } }, members of stlp_std::priv::_NonDbg_str<char, stlp_std::char_traits<char>, stlp_std::allocator<char> >: static npos = <optimized out> }
(The structure is even more complex if -D_STLP_DEBUG is used.)