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 the vtable – p *object still doesn’t print it out.
How do I print the vtable?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(gdb) set $i = 0 (gdb) while $i < 10 >print $i >p /a (*(void ***)obj)[$i] >set $i = $i + 1 >endWhere “obj” is the object whose vtable you’d like to print, and 10 is the number of methods.