I am trying to inspect the contents of a std::multimap
and std::multiset
in the Locals and Expressions window of the QtCreator.
Instead of a list of values I get the implementation details displayed.
The strange thing is that the std::map
and std::set
counterparts are shown fine:
#include <iostream>
#include <map>
#include <set>
#include <string>
int main()
{
std::multimap<int, std::string> multimap;
multimap.insert(std::make_pair(1, "one"));
multimap.insert(std::make_pair(2, "two"));
multimap.insert(std::make_pair(3, "three"));
std::multiset<int> multiset = {1,2,3};
std::map<int, std::string> map;
map.insert(std::make_pair(1, "one"));
map.insert(std::make_pair(2, "two"));
map.insert(std::make_pair(3, "three"));
std::set<int> set = {1,2,3};
return 0;
}
I am using:
Qt Creator 3.0.0
gcc 4.8
GDB 7.6.1
Qt 5.2.0
Ubuntu 13.10
Is this feature supported?
In addition to installing Python libstdc++ printers from https://sourceware.org/gdb/wiki/STLSupport you should also fix them for Ubuntu 13.10.
You should apply this patch http://patchwork.ozlabs.org/patch/287368/ to make them work. See also this answer https://stackoverflow.com/a/21020798/72178.
You might install the pretty printers for gdb:
Make sure you get at least version 6