Eclipse fails to print local std::set variable. I believe it is a GDB MI bug. FAIL: gdb-7.6.1-46.fc19.x86_64 FAIL: GNU gdb (GDB) 7.6.50.20131124-cvs Why GDB still insists on "var1.<error at 0>" even after -var-update? Removing earlier 32-var-list-children var1 fixes the problem, it then prints: 99^done,numchild="1",children=[child={name="var1.[0]",exp="[0]",numchild="1",type="C",thread-id="1"}],has_more="0" ------------------------------------------------------------------------------ #include <set> class C { public: int i; C(int *ip):i(*ip) {} }; namespace std { template<> bool less<C>::operator()(const C &a,const C &b) const { return a.i<b.i; } } int main() { int i=1; std::set<C> xxxvariable; xxxvariable.insert(C(&i)); return 0; } ------------------------------------------------------------------------------ gdb -i=mi <cmd ------------------------------------------------------------------------------ 5-enable-pretty-printing 15-file-exec-and-symbols ./cxx 18-break-insert -t -f main 20-exec-run 31-var-create --thread 1 --frame 0 - * xxxvariable 32-var-list-children var1 33-break-insert -t -f cxx.cpp:14 34-exec-continue 38-var-update var1 99-var-list-children var1 ------------------------------------------------------------------------------ 38^done,changelist=[] 99^done,numchild="1",children=[child={name="var1.<error at 0>",exp="<error at 0>",numchild="36",type="char [36]",thread-id="1"}],has_more="0"
Created attachment 7301 [details] eclipse-cdt-8.2.1-3.fc19.x86_64 screenshot
Created attachment 7302 [details] Eclipse GDB MI input
Created attachment 7303 [details] Eclipse GDB MI output
Seems to be fixed with: eclipse-cdt-9.2.1-2.fc25.x86_64 gdb-7.12.1-48.fc25.x86_64