Print C++ vtables using GDB

后端 未结 5 2218
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 16:09

I\'m trying to print an object\'s vtable using gdb; I found the

show print vt bl on

setting, but I still don\'t actually know how to print

5条回答
  •  眼角桃花
    2020-12-02 16:16

    If you have a sufficiently new version of gdb, you may want to look at the "info vtbl" command.

    I only noticed the feature when googling for an answer to this question and I noticed posts to the gdb mailing list circa 2012, notably this one from March 2012:

    http://permalink.gmane.org/gmane.comp.gdb.patches/73957

提交回复
热议问题