When code is compiled with -D_GLIBCXX_DEBUG, then std::vector is replaced with std::__debug::vector. Our pretty-printers should work on those as well. Example: #include <vector> int main() { std::vector<int> v; v.push_back(1); return 0; // break here } g++ -g t.cc gdb64-cvs -q ./a.out (gdb) b 7 Breakpoint 1 at 0x4007b4: file t.cc, line 7. (gdb) r Breakpoint 1, main () at t.cc:7 7 return 0; // break here (gdb) p v $1 = std::vector of length 1, capacity 1 = {1} g++ -g t.cc -D_GLIBCXX_DEBUG gdb64-cvs -q ./a.out (gdb) b 7 Breakpoint 1 at 0x400aa4: file t.cc, line 7. (gdb) r Breakpoint 1, main () at t.cc:7 7 return 0; // break here (gdb) p v $1 = {<std::__norm::vector<int, std::allocator<int> >> = {<std::__norm::_Vector_base<int, std::allocator<int> >> = { _M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x603010, _M_finish = 0x603014, _M_end_of_storage = 0x603014}}, <No data fields>}, <__gnu_debug::_Safe_sequence<std::__debug::vector<int, std::allocator<int> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 2}, <No data fields>}, _M_guaranteed_capacity = 1} (gdb) q
FYI: I've submitted a patch for this to gcc-patches: http://gcc.gnu.org/ml/gcc-patches/2009-09/msg02187.html
This has been checked in: http://gcc.gnu.org/ml/gcc-cvs/2009-10/msg00034.html I'll close this bug, as the initial implementation request.