C++ operator() overloading does not work in gdb. Try this program: struct S { int operator() (int x) { return x + 5; } }; int main () { S s; return s(23); } When I try "print s(23)", I get: (gdb) p s(23) Invalid data type for function to be called.