好文, 与当年我看《深度探索c++对象模型》时的困惑一样,当时看的也是云里雾里。
https://blog.csdn.net/shichao1470/article/details/91563282
有一点要说明一下, 现在最新的g++编译器,dump出c++类对象内存布局的编译选项,应该变为:-fdump-lang-class
, 而不是链接中的 -fdump-class-hierarchy
选项, 最起码在我电脑上是这样的, 查看了在最新的gcc官方手册上, 也是这样的, 说明如下:
-fdump-lang-all
-fdump-lang-switch
-fdump-lang-switch-options
-fdump-lang-switch-options=filename
Control the dumping of language-specific information. The options and filename portions behave as described in the ‘-fdump-tree’ option. The following
switch values are accepted:
‘all’
Enable all language-specific dumps.
‘class’ Dump class hierarchy information. Virtual table information is
emitted unless ’‘slim’’ is specified. This option is applicable to
C++ only.
‘raw’ Dump the raw internal tree data. This option is applicable to C++
only.
原文链接: https://www.cnblogs.com/yinheyi/p/14824132.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍;
也有高质量的技术群,里面有嵌入式、搜广推等BAT大佬
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/394893
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!