Solved

How to find the vptr and vtable address

Posted on 2012-04-09
2
860 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
ID: 37825362
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
ID: 37826103
Thank you jkr. Yes, it appears fdump-class-hierarchy should help me. I will read through the wikipedia article.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to creat good software interface ? 1 67
How to learn Linux? 10 67
Installshield for Embarcadero EX 10.1 Berlin 4 60
draw a Christmas tree by using a nested loop? 26 77
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 …
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

856 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