Is there any way to reset the class layout of the compiled g ++ program

When compiling with g ++, -fdump-class-hierarchy exports the vtables program in a (more or less) human readable format. However, the resulting file contains only information about the virtual table, but not about the layout of the class itself. I would like to get a complete list of layouts of all my program classes.

clang offers the arguments -cc1 -fdump-record-layouts to achieve this. The MS compiler can be called using -d1reportAllClassLayout. Is there any g ++ switch that does this?

+4
source share
1 answer

, pahole vtable- :

g++ -ggdb3 -c program.cpp
pahole program.o

, g++ , , .

+1

All Articles