Can gdb break on implicit class methods?
问题 The compiler generates some class methods like copy constructors, destructors, etc. Is it possible to have gdb break on those methods to, e.g., observe where objects are being copied or destroyed? 回答1: Can gdb break on implicit class methods? Yes, of course, it can. (gdb) break MyClass::MyClass(const MyClass &) // break when copied (gdb) break MyClass::~MyClass() // break when object destroyed as simple as that. These are breakpoints based, NOT on file:line, but on function names. If you've a