0

Say if I have this basePointer pointers points to a Base class object.

(gdb) ptype basePointer
type = class Base {
  public:
    Base(void);
    virtual ~Base(void);
    virtual void hello();
} *
(gdb) p basePointer
$1 = (Base *) 0x100104c00

If I know this 0x100104c00, is it possible to infer the class name of the object that basePointer points to in gdb?

mike
  • 25
  • 4

1 Answers1

0

try p (Derived *)basePointer casting works in gdb as it works in C

Alexander Oh
  • 24,223
  • 14
  • 73
  • 76