I've configured pretty printers using http://wiki.eclipse.org/CDT/User/FAQ#How_can_I_inspect_the_contents_of_STL_containers.3F. It successfully works for vector and other containers. However I can't get to inspect maps as in the example below:
#include <map>
#include <iostream>
using namespace std;
int main ()
{
map <int, string> mapIntToString;
map <int, int> mapInt2;
mapIntToString.insert (map <int, string>::value_type (3, "Three"));
mapInt2.insert (map <int, int>::value_type (3, 4));
return 0;
}
I get the following error when printing using gdb:
(gdb) p mapInt2
$1 = std::map with 1 elementsTraceback (most recent call last):
File "/home/myuser/opt/gdb_printers/python/libstdcxx/v6/printers.py", line 422, in children
rep_type = find_type(self.val.type, '_Rep_type')
File "/home/myuser/opt/gdb_printers/python/libstdcxx/v6/printers.py", line 45, in find_type
raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
ValueError: Cannot find type std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rep_type
_Rep_type
is [at least on some systems] a private typedef in std::map. perhap's that assumption is not always true. I suggest you notify the developers of pretty printers. – Enantiomorph