Solved

How to find the vptr and vtable address

Posted on 2012-04-09
2
815 Views
Last Modified: 2012-04-11
Hi experts,
I am doing some in investigation on c++ crashes and wanted to dome experiment by corrupting the vptr of a class. I know the memory layout of an object depends on the compiler. I am using gcc and want to access the vptr. Also, is there a way to find the address of vtable.
Using Gdb is fine too
0
Comment
Question by:ambuli
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
Comment Utility
Simtimes Wikipedia is more useful than you expect it to be, see http://en.wikipedia.org/wiki/Virtual_method_table and especiay "Notes" as well as http://sourcery.mentor.com/public/cxx-abi/cxx-closed.html (also from that article) for other compiler verions and OS flavors.
0
 

Author Comment

by:ambuli
Comment Utility
Thank you jkr. Yes, it appears fdump-class-hierarchy should help me. I will read through the wikipedia article.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now