How to determine if an object is an instance of certain derived C++ class from a pointer to a base class in GDB?
Use ptype. If you use it by itself, you get the declared type of the pointer: (gdb) ptype ptr type = class SuperClass { // various members } * To get the actual type of the object pointed to, set the “print object” variable: (gdb) set print object on (gdb) ptype ptr type = /* … Read more