title: How to list class methods in gdb?
body: <p>I've been googling for this and checking through the gdb manual but can't seem to find an answer to what I'm trying to do.</p>
  
  <p>Is there a way to get gdb to print out a listing of all the methods for a given class type? The print command only seems to show the data members and fields, none of the methods are displayed for it.</p>
  
  <p>Additionally, to take it a step further, is there a way to print all the correct virtual methods given a base *pointer? Say like for example:</p>
  
  <pre><code>struct A
  {
    virtual void foo() {}
  };
  
  struct B : public A
  {
    void foo() {}
  };
  
  int main()
  {
    A *b = new B;
  }
  </code></pre>
  
  <p>How can I get gdb to print variable *b and have it show the correct virtual method(s)?</p>
  
  <p>Thanks</p>