Take this (badly mangled to save the names of the guilty) chunk of “code” and run it through the Intel C++ compiler with any -g option you want:
class C {
private:
int (functionA*)(args);
C(){
functionA = functionB;
}
functionC(args) {
rc = (this->*functionA)(args);
}
template
/* some code */
}
};
Now try debugging functionB when it’s called via functionC using gdb. In particular, try looking at the args fed to function B.
Now weep for your soul. And TotalView won’t help you now either buddy. You’re down to objdump -t library.a | c++filt | grep functionC and setting some stupid-looking C++ mangled name out of the mess you get back as the breakpoint in gdb.
There has to be a better way…