Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual C++ Compiler Option To Dump Class Hierarchy

Is there any compiler option in MS Visual C++ equivalent to GCC's -fdump-class-hierarchy? i.e. showing the virtual function table layout.

like image 600
JavaMan Avatar asked Feb 27 '23 20:02

JavaMan


1 Answers

try

cl.exe /d1reportAllClassLayout test.cpp

The output is something like:

class request_handlerAttribute  size(8):
        +---
 0      | name
 4      | sdl
        +---



class perfmonAttribute  size(8):
        +---
 0      | name
 4      | register
        |  (size=3)
        +---

Found doing: + findstr /i class c1xx.dll > c1xx.txt
+ and then manually inspecting c1xx.txt

Hope it can help, Benedetto

PS: This obviously is an undocumented and unsupported switch.
Look also here for a similar switch.

like image 194
Benedetto Avatar answered Mar 08 '23 03:03

Benedetto