title: How to watch the vtable in gdb in a C++ program?
body: <p>I have an interesting problem in one of my C++ programs. Apperantly the vtable of one of my classes is/becomes messed up during program execution. In a gdb session I found out that if I call a method of the object directly it succeeds, but if I use a pointer or reference I end up in the destructor of a completely unrelated class which isn't going to be instantiated anytime soon. Without the <code>this</code>-Pointer changing of course.</p>
  
  <p>Assuming my observations are correct, how do I watch the vtable of an object in gdb? I'm on Linux using gcc, my gdb version is <code>GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08</code>.</p>