With types like map<int, int> and vector<map<int, int>>, printing in gdb on OS X 10.4 gave me errors like these (oddly, pair<int, int> worked just fine):
Python Exception <class 'gdb.error'> There is no member or method named first.:
$1 = std::__1::map (count=2)
$2 = std::__1::vector (length=2, capacity=2) = {
Python Exception <class 'gdb.error'> There is no member or method named first.:
[0] = std::__1::map (count=2),
Python Exception <class 'gdb.error'> There is no member or method named first.:
[1] = std::__1::map (count=2)
}
Disabling reading .gdbinit and inspecting an iterator of the map gave me
$3 = {__cc = {first = 0, second = 1}, __nc = {first = 0, second = 1}}
and adding ['__cc'] to the related classes fixed the problem. Making such modifications in other classes would be a good idea, but I didn't look into where all this should be done.
With types like
map<int, int>
andvector<map<int, int>>
, printing in gdb on OS X 10.4 gave me errors like these (oddly,pair<int, int>
worked just fine):Disabling reading
.gdbinit
and inspecting an iterator of the map gave meand adding
['__cc']
to the related classes fixed the problem. Making such modifications in other classes would be a good idea, but I didn't look into where all this should be done.